function uc_encryption_class::checkRange in Ubercart 6.2
Checks that $num points to an entry in self::$scramble1.
2 calls to uc_encryption_class::checkRange()
- uc_encryption_class::decrypt in uc_store/
uc_store.module - Decrypts cyphertext.
- uc_encryption_class::encrypt in uc_store/
uc_store.module - Encrypts plaintext.
File
- uc_store/
uc_store.module, line 2037 - Contains global Ubercart functions and store administration functionality.
Class
- uc_encryption_class
- Handle encryption of credit-card information.
Code
function checkRange($num) {
$num = round($num);
$limit = strlen(self::$scramble1);
while ($num >= $limit) {
$num = $num - $limit;
}
while ($num < 0) {
$num = $num + $limit;
}
return $num;
}