You are here

class Crypt in Express 8

Extends \Drupal\Component\Utility\Crypt.

Hierarchy

  • class \Drupal\Component\Utility\Crypt
    • class \Drupal\bootstrap\Utility\Crypt

Expanded class hierarchy of Crypt

1 file declares its use of Crypt
Theme.php in themes/contrib/bootstrap/src/Theme.php
Contains \Drupal\bootstrap.

File

themes/contrib/bootstrap/src/Utility/Crypt.php, line 14
Contains \Drupal\bootstrap\Utility\Crypt.

Namespace

Drupal\bootstrap\Utility
View 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

Namesort descending Modifiers Type Description Overrides
Crypt::generateHash public static function Generates a unique hash name.
Crypt::hashBase64 public static function Calculates a base-64 encoded, URL-safe sha-256 hash.
Crypt::hashEquals Deprecated public static function Compares strings in constant time.
Crypt::hmacBase64 public static function Calculates a base-64 encoded, URL-safe sha-256 hmac.
Crypt::randomBytes Deprecated public static function Returns a string of highly randomized bytes (over the full 8-bit range).
Crypt::randomBytesBase64 public static function Returns a URL-safe, base64 encoded string of highly randomized bytes.