/// Computes the hash of a struct using an hash function that can be modelled as
/// a random oracle.
///
/// The digest is the hash of `domain` appended with the unique digest of
/// `data`. 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.

The digest is the hash of `domain` appended with the unique digest of
`data`. 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 . The digest is the hash of ` domain ` appended with the unique digest of ` data ` . A distinct ` domain ` should be used for each purpose of the random oracle .
pub fn random_oracle(domain: &str, data: &dyn UniqueHash) -> [u8; 32] {
    let mut hasher = new_hasher_with_domain(domain);
    hasher.write(&data.unique_hash());
    hasher.finish()
}
pub fn random_oracle ( domain : & str , data : & dyn UniqueHash ) -> [ u8 ; 32 ] { let mut hasher = new_hasher_with_domain ( domain ) ; hasher . write ( & data . unique_hash ( ) ) ; hasher . finish ( ) }
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