| 7 bootstrap.inc | drupal_hash_base64($data) |
| 8 bootstrap.inc | drupal_hash_base64($data) |
Calculates a base-64 encoded, URL-safe sha-256 hash.
Parameters
$data: String to be hashed.
Return value
A base-64 encoded sha-256 hash, with + replaced with -, / with _ and any = padding characters removed.
36 calls to drupal_hash_base64()
File
- includes/
bootstrap.inc, line 2005 - Functions that need to be loaded on every Drupal request.
Code
function drupal_hash_base64($data) {
$hash = base64_encode(hash('sha256', $data, TRUE));
// Modify the hash so it's safe to use in URLs.
return strtr($hash, array('+' => '-', '/' => '_', '=' => ''));
}
Login or register to post comments