HashFunction

Cryptographic hash functions used by drand signing schemes.

Different drand networks use different hash functions depending on their requirements:

  • Most networks (BLS12-381) use SHA-256 for beacon message hashing

  • BN254-based networks use Keccak-256 for EVM compatibility

Platform Implementations

  • JVM: Uses BouncyCastle provider with ThreadLocal digest instances for performance

  • JS: Uses @noble/hashes library for browser compatibility

See also

for which hash function each signing scheme uses

Entries

Link copied to clipboard

SHA-256 (Secure Hash Algorithm 256-bit).

Link copied to clipboard

Keccak-256 hash function.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Computes the hash of the input bytes using this hash function.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.