protected function UbercartEncryption::checkRange in Ubercart 7.3
Checks that $num points to an entry in self::$scramble1.
2 calls to UbercartEncryption::checkRange()
- UbercartEncryption::decrypt in uc_store/
classes/ encrypt.inc - Decrypts cyphertext.
- UbercartEncryption::encrypt in uc_store/
classes/ encrypt.inc - Encrypts plaintext.
File
- uc_store/
classes/ encrypt.inc, line 220 - Utility class definition.
Class
- UbercartEncryption
- Handles encryption of credit-card information.
Code
protected function checkRange($num) {
$num = round($num);
$limit = strlen(self::$scramble1);
while ($num >= $limit) {
$num = $num - $limit;
}
while ($num < 0) {
$num = $num + $limit;
}
return $num;
}