class Crypt in Express 8
Extends \Drupal\Component\Utility\Crypt.
Hierarchy
Expanded class hierarchy of Crypt
1 file declares its use of Crypt
File
- themes/
contrib/ bootstrap/ src/ Utility/ Crypt.php, line 14 - Contains \Drupal\bootstrap\Utility\Crypt.
Namespace
Drupal\bootstrap\UtilityView source
class Crypt extends \Drupal\Component\Utility\Crypt {
/**
* Generates a unique hash name.
*
* @param ...
* All arguments passed will be serialized and used to generate the hash.
*
* @return string
* The generated hash identifier.
*/
public static function generateHash() {
$args = func_get_args();
$hash = '';
if (is_string($args[0])) {
$hash = $args[0] . ':';
}
elseif (is_array($args[0])) {
$hash = implode(':', $args[0]) . ':';
}
$hash .= self::hashBase64(serialize($args));
return $hash;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Crypt:: |
public static | function | Generates a unique hash name. | |
Crypt:: |
public static | function | Calculates a base-64 encoded, URL-safe sha-256 hash. | |
Crypt:: |
public static | function | Compares strings in constant time. | |
Crypt:: |
public static | function | Calculates a base-64 encoded, URL-safe sha-256 hmac. | |
Crypt:: |
public static | function | Returns a string of highly randomized bytes (over the full 8-bit range). | |
Crypt:: |
public static | function | Returns a URL-safe, base64 encoded string of highly randomized bytes. |