blake2x256!() { /* proc-macro */ }
Expand description

Computes and expands into the BLAKE2b 256-bit hash of the string input.

Note

  • The computation takes place at compilation time of the crate.
  • The returned value is of type [u8; 32].

Example

assert_eq!(
    blake2x256!("hello"),
    {
        let mut output = [0u8; 32];
        blake2b_256(b"hello", &mut output);
        output
    }
);