protected function MarstonEncryption::checkRange in Ubercart 8.4
Checks that $num points to an entry in self::$scramble1.
2 calls to MarstonEncryption::checkRange()
- MarstonEncryption::decrypt in uc_store/
src/ MarstonEncryption.php - Decrypts cyphertext.
- MarstonEncryption::encrypt in uc_store/
src/ MarstonEncryption.php - Encrypts plaintext.
File
- uc_store/
src/ MarstonEncryption.php, line 214
Class
- MarstonEncryption
- Deprecated. Handles encryption of credit-card information.
Namespace
Drupal\uc_storeCode
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;
}