function _openid_dh_binary_to_long
3 calls to _openid_dh_binary_to_long()
- OpenIDTestCase::testConversion in modules/
openid/ openid.test - Test _openid_dh_XXX_to_XXX() functions.
- _openid_dh_base64_to_long in modules/
openid/ openid.inc - _openid_dh_rand in modules/
openid/ openid.inc
File
-
modules/
openid/ openid.inc, line 478
Code
function _openid_dh_binary_to_long($str) {
$bytes = array_merge(unpack('C*', $str));
$n = 0;
foreach ($bytes as $byte) {
$n = _openid_math_mul($n, pow(2, 8));
$n = _openid_math_add($n, $byte);
}
return $n;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.