/// Computes the hash of a struct using an hash function that can be modelled as
/// a random oracle. Returns an element in the scalar field of curve BLS12_381.
///
/// A distinct `domain` should be used for each purpose of the random oracle.
Computes the hash of a struct using an hash function that can be modelled as
a random oracle. Returns an element in the scalar field of curve BLS12_381.

A distinct `domain` should be used for each purpose of the random oracle.
Computes the hash of a struct using an hash function that can be modelled as a random oracle . Returns an element in the scalar field of curve BLS12_381 . A distinct ` domain ` should be used for each purpose of the random oracle .
pub fn random_oracle_to_scalar(domain: &str, data: &dyn UniqueHash) -> BIG {
    let hash = random_oracle(domain, data);
    let rng = &mut RAND_ChaCha20::new(hash);
    BIG::randomnum(&curve_order(), rng)
}
pub fn random_oracle_to_scalar ( domain : & str , data : & dyn UniqueHash ) -> BIG { let hash = random_oracle ( domain , data ) ; let rng = & mut RAND_ChaCha20 :: new ( hash ) ; BIG :: randomnum ( & curve_order ( ) , rng ) }
Computes the hash of a struct using an hash function that can be modelled as
a random oracle.
Computes the hash of a struct using an hash function that can be modelled as a random oracle .
domain
&str
data
&dyn UniqueHash