sha256_to_field_pub

Function sha256_to_field_pub 

Source
pub fn sha256_to_field_pub(data: &[u8]) -> Fr
Expand description

Compute the SHA256 hash of a byte slice, returning the result as an Fr.

Matches the TS sha256ToField which truncates to 31 bytes and prepends a zero byte, guaranteeing the result fits in the BN254 scalar field. Public version of sha256_to_field for cross-crate use.