function _openid_sha1

6.x openid.inc _openid_sha1($text)
2 calls to _openid_sha1()
_openid_dh_xorsecret in drupal-6.x/modules/openid/openid.inc
_openid_hmac in drupal-6.x/modules/openid/openid.inc

File

drupal-6.x/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;
}