macro_rules! hash {
($txt:literal $(,)?) => { ... };
}Expand description
Construct variable-length Hash from base16-encoded text strings.
ยงexamples
assert_eq!(
<[u8; 28]>::from(hash!("00000000000000000000000000000000000000000000000000000000")),
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
)assert_eq!(
<[u8; 32]>::from(hash!("702206530b2e1566e90b3aec753bd0abbf397842bd5421e0c3d23ed10167b3ce")),
[112, 34, 6, 83, 11, 46, 21, 102, 233, 11, 58, 236, 117, 59, 208, 171, 191, 57, 120, 66, 189, 84, 33, 224, 195, 210, 62, 209, 1, 103, 179, 206],
)