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§
Sourcetype PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>
type PublicKeyMaterial: VRFPublicKey<PrivateKeyMaterial = Self>
The associated public key type for this private key.
Sourcetype ProofMaterial: VRFProof<PrivateKeyMaterial = Self>
type ProofMaterial: VRFProof<PrivateKeyMaterial = Self>
The associated proof type for this private key.
Required Methods§
Sourcefn compute(&self, seed: &[u8]) -> Result<Self::ProofMaterial>
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.