On this page
function _openid_dh_binary_to_long
_openid_dh_binary_to_long($str)
File
- modules/openid/openid.inc, line 477
- OpenID utility functions.
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!openid!openid.inc/function/_openid_dh_binary_to_long/7.x