pub struct VrfProof {
pub gamma: [u8; 32],
pub c: [u8; 16],
pub s: [u8; 32],
}Expand description
RFC 9381 compliant VRF proof (80 bytes total: 32 + 16 + 32)
Fields§
§gamma: [u8; 32]§c: [u8; 16]§s: [u8; 32]Implementations§
Source§impl VrfProof
impl VrfProof
Sourcepub fn verify(
&self,
input: &[u8],
public_key: &VrfPublicKey,
) -> Result<VrfOutput, VerificationError>
pub fn verify( &self, input: &[u8], public_key: &VrfPublicKey, ) -> Result<VrfOutput, VerificationError>
Verify a VRF proof against a public key and input
Sourcepub fn verify_output(
&self,
input: &[u8],
public_key: &VrfPublicKey,
expected_output: &VrfOutput,
) -> Result<(), VerificationError>
pub fn verify_output( &self, input: &[u8], public_key: &VrfPublicKey, expected_output: &VrfOutput, ) -> Result<(), VerificationError>
Verify a VRF proof against expected output
Sourcepub fn to_output(&self) -> Result<VrfOutput, VerificationError>
pub fn to_output(&self) -> Result<VrfOutput, VerificationError>
Convert proof to VRF output - now returns Result to avoid panics
Trait Implementations§
impl Eq for VrfProof
impl StructuralPartialEq for VrfProof
Auto Trait Implementations§
impl Freeze for VrfProof
impl RefUnwindSafe for VrfProof
impl Send for VrfProof
impl Sync for VrfProof
impl Unpin for VrfProof
impl UnsafeUnpin for VrfProof
impl UnwindSafe for VrfProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more