function _openid_sha1 in Drupal 6
2 calls to _openid_sha1()
- _openid_dh_xorsecret in modules/
openid/ openid.inc - _openid_hmac in modules/
openid/ openid.inc
File
- modules/
openid/ openid.inc, line 260 - OpenID utility functions.
Code
function _openid_sha1($text) {
$hex = sha1($text);
$raw = '';
for ($i = 0; $i < 40; $i += 2) {
$hexcode = substr($hex, $i, 2);
$charcode = (int) base_convert($hexcode, 16, 10);
$raw .= chr($charcode);
}
return $raw;
}