Trait diem_crypto::traits::VRFProof
source · pub trait VRFProof: for<'a> TryFrom<&'a [u8], Error = CryptoMaterialError> + Sized + Debug + Clone + Eq + Hash + Sealed {
type PublicKeyMaterial: VRFPublicKey<ProofMaterial = Self>;
type PrivateKeyMaterial: VRFPrivateKey<ProofMaterial = Self>;
// Required methods
fn to_hash(&self) -> Result<HashValue>;
fn verify(
&self,
seed: &[u8],
public_key: &Self::PublicKeyMaterial
) -> Result<HashValue>;
}
Expand description
The proof of VRF
Required Associated Types§
sourcetype PublicKeyMaterial: VRFPublicKey<ProofMaterial = Self>
type PublicKeyMaterial: VRFPublicKey<ProofMaterial = Self>
The associated public key type for this proof.
sourcetype PrivateKeyMaterial: VRFPrivateKey<ProofMaterial = Self>
type PrivateKeyMaterial: VRFPrivateKey<ProofMaterial = Self>
The associated private key type for this proof.
Required Methods§
Object Safety§
This trait is not object safe.