Trait VRFPrivateKey

Source
pub trait VRFPrivateKey:
    PrivateKey<PublicKeyMaterial = Self::PublicKeyMaterial>
    + ValidCryptoMaterial
    + Sealed {
    type PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>;
    type ProofMaterial: VRFProof<PrivateKeyMaterial = Self>;

    // Required method
    fn compute(&self, seed: &[u8]) -> Result<Self::ProofMaterial>;
}
Expand description

Private key for VRF

Required Associated Types§

Source

type PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>

The associated public key type for this private key.

Source

type ProofMaterial: VRFProof<PrivateKeyMaterial = Self>

The associated proof type for this private key.

Required Methods§

Source

fn compute(&self, seed: &[u8]) -> Result<Self::ProofMaterial>

Generate a random number (hash) with a proof for verification.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§