return the check digits of a iban
check digits corresponding to ISO 7064

@return      string                  check digits
169446
public function getCheckDigits()
    {
        $checkDigits = '';
        $iban = $this->getIban();
        if (!empty($iban)) {
            $checkDigits = substr($iban, 2, 2);
        }
        return $checkDigits;
    }
289655
protected function generateCheckSum() {
        return sha1(
                        sprintf("%s|%s|%s|%s|%s|%s|%s", $this->_merchantID, $this->_secretCode, $this->data->ic_amount, $this->data->ic_orderid, $this->data->ic_reference, $this->data->ic_currency, $this->data->ic_country
                        )
        );
    }
360126
public function generateSigninInput()
    {
        $base64payload = $this->encoder->encode(json_encode($this->getPayload(), JSON_UNESCAPED_SLASHES));
        $base64header = $this->encoder->encode(json_encode($this->getHeader(), JSON_UNESCAPED_SLASHES));

        return sprintf('%s.%s', $base64header, $base64payload);
    }
1302590
private function isChecksumValid()
    {
        $countryCode = $this->getCountryCode();
        $checksum = $this->getChecksum();
        $accountIdentification = $this->getAccountIdentification();
        $numericCountryCode = $this->getNumericCountryCode($countryCode);
        $numericAccountIdentification = $this->getNumericAccountIdentification($accountIdentification);
        $invertedIban = $numericAccountIdentification . $numericCountryCode . $checksum;

        return $this->bcmod($invertedIban, 97) === '1';
    }
757796
public function getSteamID64() {
		if (PHP_INT_SIZE == 4) {
			$ret = new Math_BigInteger();
			$ret = $ret->add((new Math_BigInteger($this->universe))->bitwise_leftShift(56));
			$ret = $ret->add((new Math_BigInteger($this->type))->bitwise_leftShift(52));
			$ret = $ret->add((new Math_BigInteger($this->instance))->bitwise_leftShift(32));
			$ret = $ret->add(new Math_BigInteger($this->accountid));
			return $ret->toString();
		}
		return (string) (($this->universe << 56) | ($this->type << 52) | ($this->instance << 32) | ($this->accountid));
	}
1154936
protected static function getInvalidCharacters()
    {
        if (!self::$invalidCharString) {
            self::$invalidCharString = implode('', array_map('chr', array_merge(
                range(0, 32),
                array(34, 40, 41, 44, 47),
                array(58, 59, 60, 61, 62, 63, 64, 91, 92, 93, 123, 125, 127)
            )));
        }

        return self::$invalidCharString;
    }
1237441
public static function getRandomUuid()
    {
        return sprintf(
            '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
            // 32 bits for "time_low"
            mt_rand(0, 0xffff),
            mt_rand(0, 0xffff),
            // 16 bits for "time_mid"
            mt_rand(0, 0xffff),
            // 16 bits for "time_hi_and_version",
            // four most significant bits holds version number 4
            mt_rand(0, 0x0fff) | 0x4000,
            // 16 bits, 8 bits for "clk_seq_hi_res",
            // 8 bits for "clk_seq_low",
            // two most significant bits holds zero and one for variant DCE1.1
            mt_rand(0, 0x3fff) | 0x8000,
            // 48 bits for "node"
            mt_rand(0, 0xffff),
            mt_rand(0, 0xffff),
            mt_rand(0, 0xffff)
        );
    }
1355191
public function toBinary()
    {
        $binary = hex2bin(str_pad(dechex(ord($this->signature)), 2, 0, STR_PAD_LEFT));
        $binary .= hex2bin($this->dec2hex($this->userPrivilege));
        $binary .= hex2bin($this->callbackPhoneNumber);
        
        return $binary;
    }
289461
public function getRules()
    {
        $base = 1024;

        $this->defaultParams['num_decimals'] = 0;
        $this->defaultParams['round_type']   = Formatter::ROUND_NONE;

        return array(
            'byte' => array(
                'symbol' => 'B',
                'rate'   => 1,
            ),
            'kb'   => array(
                'symbol' => 'KB',
                'rate'   => pow($base, 1),
            ),
            'mb'   => array(
                'symbol' => 'MB',
                'rate'   => pow($base, 2),
            ),
            'gb'   => array(
                'symbol' => 'GB',
                'rate'   => pow($base, 3),
            ),
            'tb'   => array(
                'symbol' => 'TB',
                'rate'   => pow($base, 4),
            ),
            'pb'   => array(
                'symbol' => 'PB',
                'rate'   => pow($base, 5),
            ),
            'eb'   => array(
                'symbol' => 'EB',
                'rate'   => pow($base, 6),
            ),
            'zb'   => array(
                'symbol' => 'ZB',
                'rate'   => pow($base, 7),
            ),
            'yb'   => array(
                'symbol' => 'YB',
                'rate'   => pow($base, 8),
            ),

            'bit'  => array(
                'symbol' => 'Bit',
                'rate'   => function ($value, $ruleTo) {

                    if ($ruleTo === 'bit') {
                        return $value * 8;
                    }

                    return $value / 8;
                },
            ),
        );
    }
558742
protected function validateEncoding(): string
    {
        if (function_exists('mb_check_encoding')
            && mb_check_encoding($this->value, 'UTF-8')
        ) {
            return $this->value;
        }

        return function_exists('iconv')
            ? iconv('utf-8', 'utf-8', $this->value)
            : '';
    }
1045505
public function getReadableGUID()
    {
        $guid = $this->getGUID();
        if (preg_match(Number::GUID_REGEX, $guid)) {
            return $guid;
        }
        return Number::guid(false, false, $guid);
    }
392652
private function doGetOrdinalsBin()
    {
        $ordinals = [];
        $bitset   = $this->bitset;
        $byteLen  = \strlen($bitset);
        for ($bytePos = 0; $bytePos < $byteLen; ++$bytePos) {
            if ($bitset[$bytePos] === "\0") {
                // fast skip null byte
                continue;
            }

            $ord = \ord($bitset[$bytePos]);
            for ($bitPos = 0; $bitPos < 8; ++$bitPos) {
                if ($ord & (1 << $bitPos)) {
                    $ordinals[] = $bytePos * 8 + $bitPos;
                }
            }
        }
        return $ordinals;
    }
343244
public function parseEncodedBinary()
    {
        $f = ord($this->read(1));
        if ($f <= 250) {
            return $f;
        }
        if ($f === 251) {
            return null;
        }
        if ($f === 255) {
            return false;
        }
        if ($f === 252) {
            return Binary::bytes2int($this->read(2), true);
        }
        if ($f === 253) {
            return Binary::bytes2int($this->read(3), true);
        }
        return Binary::bytes2int($this->read(8), true);
    }
385953
public function hashCode()
    {
        $validPk = null !== $this->getId() &&
            null !== $this->getVersion();

        $validPrimaryKeyFKs = 1;
        $primaryKeyFKs = [];

        //relation kk_trixionary_skill_version_fk_717d45 to table kk_trixionary_skill
        if ($this->aSkill && $hash = spl_object_hash($this->aSkill)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
1033875
public function getUuid()
    {
        $integers = array_values(unpack('n8', $this->generator->getBytes(16)));

        $integers[3] &= 0x0FFF;
        $integers[4] = $integers[4] & 0x3FFF | 0x8000;

        return vsprintf('%04x%04x-%04x-4%03x-%04x-%04x%04x%04x', $integers);
    }
842413
public function prepareCheckDigitsCalculate($iban)
    {
        $firstPlaces = substr((string)$iban, 0, 2);
        $lastPlaces = substr((string)$iban, 4);
        $conversion = strtr((string)$lastPlaces . (string)$firstPlaces . '00', $this->charMatching);
        return $conversion;
    }
436025
public function readInt64()
    {

        // We have the pack 64-bit codes available. See: http://php.net/manual/en/function.pack.php
        if (version_compare(PHP_VERSION, '5.6.3') >= 0 && PHP_INT_SIZE == 8) {
            // Change the integer type we are looking up
            switch ($this->number_type) {
                case self::NUMBER_TYPE_BIGENDIAN:
                    $type = 'Jint';
                    break;

                case self::NUMBER_TYPE_LITTLEENDIAN:
                    $type = 'Pint';
                    break;

                default:
                    $type = 'Qint';
            }

            $int64 = unpack($type, $this->read(8));

            $int = $int64['int'];

            unset($int64);
        } else {
            if ($this->number_type == self::NUMBER_TYPE_BIGENDIAN) {
                $high = $this->readInt32();
                $low = $this->readInt32();
            } else {
                $low = $this->readInt32();
                $high = $this->readInt32();
            }

            // We have to determine the number via bitwise
            $int = ($high << 32) | $low;

            unset($low, $high);
        }

        return $int;
    }