Skip to content

Latest commit

 

History

History
79 lines (37 loc) · 1.96 KB

hash.md

File metadata and controls

79 lines (37 loc) · 1.96 KB

Module 0x2::hash

Module which defines hash functions. Note that Sha-256 and Sha3-256 is available in the std::hash module in the Move standard library and wrap the functions at here.

use 0x1::hash;

Function sha2_256

public fun sha2_256(data: vector<u8>): vector<u8>

Function sha3_256

public fun sha3_256(data: vector<u8>): vector<u8>

Function blake2b256

@param data: Arbitrary binary data to hash Hash the input bytes using Blake2b-256 and returns 32 bytes.

public fun blake2b256(data: &vector<u8>): vector<u8>

Function keccak256

@param data: Arbitrary binary data to hash Hash the input bytes using keccak256 and returns 32 bytes.

public fun keccak256(data: &vector<u8>): vector<u8>

Function ripemd160

@param data: Arbitrary binary data to hash Hash the input bytes using ripemd160 and returns 20 bytes.

public fun ripemd160(data: &vector<u8>): vector<u8>