You are here

function uc_encryption_class::_checkRange in Ubercart 5

2 calls to uc_encryption_class::_checkRange()
uc_encryption_class::decrypt in uc_store/uc_store.module
uc_encryption_class::encrypt in uc_store/uc_store.module

File

uc_store/uc_store.module, line 2802
Contains global Ubercart functions and store administration functionality.

Class

uc_encryption_class
Trimmed down version of GPL class by Tony Marston. Details available at http://www.tonymarston.co.uk/php-mysql/encryption.html

Code

function _checkRange($num) {
  $num = round($num);
  $limit = strlen($this->scramble1);
  while ($num >= $limit) {
    $num = $num - $limit;
  }
  while ($num < 0) {
    $num = $num + $limit;
  }
  return $num;
}