Function ripemd160_array

Source
pub fn ripemd160_array(value: &[u8]) -> [u8; 20]
Expand description

Hashes the bytes using the RIPEMD-160 hash function. This returns a 20 byte hash.

ยงExamples

use near_sdk::env::ripemd160_array;
use hex;

assert_eq!(
    &ripemd160_array(b"The phrase that will be hashed"),
    hex::decode("9a48b9195fcb14cfe6051c0a1be7882efcadaed8")
        .expect("Decoding failed")
        .as_slice()
);