aztec-packages icon indicating copy to clipboard operation
aztec-packages copied to clipboard

Aztec.nr: SecretAndhash struct

Open rahul-kothari opened this issue 6 months ago • 0 comments

struct SecretAndHash {
    secret: Field,
    hash: Field,
}
impl SecretAndHash {
    fn random() -> Self {
        let secret = unsafe_rand();
        let hash = compute_secret_hash(secret);
        SecretAndHash { secret, hash }
    }
}

Thanks Oleh for the feedback

rahul-kothari avatar Aug 12 '24 16:08 rahul-kothari