INNER CODE UNIT · Rust
create
IronCoreLabs/recrypt-rs · src/internal/mod.rs:217
pub fn create<A: Hashable, F: Sha256Hashing>(hash_func: &F, a: &A) -> AuthHash {
AuthHash {
bytes: hash_func.hash(a),
}
}
}
#[derive(Clone, Debug)]
#[cfg_attr(test, derive(PartialEq, Eq))]
pub enum EncryptedValue<T: Field + Hashable> {
EncryptedOnce(EncryptedOnceValue<T>),
Reencrypted(ReencryptedValue<T>),
}
/// A value that has been transformed at least once - this is comprised of the initial encrypted message
/// followed by a set of reencryption blocks, one that is added for each reencryption hop.
/// The number of reencryption hops is equal to the length of the encryptionBlocks Vector.
///