pub trait VRF {
type Error;
// Required methods
fn prove(
&mut self,
pkey: &Rsa<Private>,
alpha_string: &[u8],
) -> Result<Vec<u8>, Self::Error>;
fn proof_to_hash(
&mut self,
pi_string: &[u8],
) -> Result<Vec<u8>, Self::Error>;
fn verify(
&mut self,
public_key: &Rsa<Public>,
alpha_string: &[u8],
pi_string: &[u8],
) -> Result<Vec<u8>, Self::Error>;
}Expand description
A trait containing the common capabilities for VRF implementations
Required Associated Types§
Required Methods§
Sourcefn prove(
&mut self,
pkey: &Rsa<Private>,
alpha_string: &[u8],
) -> Result<Vec<u8>, Self::Error>
fn prove( &mut self, pkey: &Rsa<Private>, alpha_string: &[u8], ) -> Result<Vec<u8>, Self::Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".