Skip to main content

hash

Function hash 

Source
pub fn hash(data: &[u8]) -> [u8; 32]
Expand description

Hash a message using BLAKE3

Returns a 32-byte (256-bit) cryptographic hash.

ยงExamples

use aion_context::crypto::hash;

let hash = hash(b"Hello, AION!");
assert_eq!(hash.len(), 32);