pub struct Secret(/* private fields */);Expand description
Bandersnatch secret key.
Implementations§
Source§impl Secret
impl Secret
Sourcepub fn vrf_sign(&self, message: &Message, aux_data: &[u8]) -> Signature
pub fn vrf_sign(&self, message: &Message, aux_data: &[u8]) -> Signature
Creates a VRF signature of message and aux_data.
Auxiliary data (aux_data) is signed but doesn’t contribute to the VRF output.
Sourcepub fn vrf_output(&self, message: &Message) -> Entropy
pub fn vrf_output(&self, message: &Message) -> Entropy
Generate VRF output from the given message.
Source§impl Secret
impl Secret
Sourcepub fn ring_vrf_sign(
&self,
message: &Message,
aux_data: &[u8],
prover: &RingProver,
) -> Signature
pub fn ring_vrf_sign( &self, message: &Message, aux_data: &[u8], prover: &RingProver, ) -> Signature
Construct a Ring VRF signature.
Auxiliary data (aux_data) is signed but doesn’t contribute to the VRF output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Secret
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnwindSafe for Secret
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more