Function sha256_mod

Source
pub fn sha256_mod(input: &[u8]) -> Hash
Expand description

Computes the SHA256 hash of the given string and reduces it modulo the BLS12-381 curve modulus.

This function takes a string reference as input, computes its SHA256 hash, and then reduces the hash modulo the BLS12-381 curve modulus to ensure it fits within its field Fp. The resulting value is returned in hexadecimal format.

§Arguments

  • input - A reference to the string to be hashed.

§Returns

A String representing the hexadecimal SHA256 hash of the input reduced modulo the BLS12-381 curve modulus.