Type Alias schnorrkel::vrf::VRFOutput

source ·
pub type VRFOutput = VRFPreOut;
👎Deprecated since 0.9.2: Please use VRFPreOut instead of VRFOutput
Expand description

VRF pre-output, possibly unverified.

Aliased Type§

struct VRFOutput(pub [u8; 32]);

Fields§

§0: [u8; 32]

Implementations

source§

impl VRFPreOut

source

pub fn to_bytes(&self) -> [u8; 32]

Convert this VRF output to a byte array.

source

pub fn as_bytes(&self) -> &[u8; 32]

View this secret key as a byte array.

source

pub fn from_bytes(bytes: &[u8]) -> SignatureResult<VRFPreOut>

Construct a VRFPreOut from a slice of bytes.

source

pub fn attach_input_hash<T>( &self, public: &PublicKey, t: T, ) -> SignatureResult<VRFInOut>

Pair a non-malleable VRF output with the hash of the given transcript.

Trait Implementations

source§

impl Clone for VRFPreOut

source§

fn clone(&self) -> VRFPreOut

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VRFPreOut

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VRFPreOut

source§

fn default() -> VRFPreOut

Returns the “default value” for a type. Read more
source§

impl Hash for VRFPreOut

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for VRFPreOut

source§

fn cmp(&self, other: &VRFPreOut) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for VRFPreOut

source§

fn eq(&self, other: &VRFPreOut) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for VRFPreOut

source§

fn partial_cmp(&self, other: &VRFPreOut) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for VRFPreOut

source§

impl Eq for VRFPreOut

source§

impl StructuralPartialEq for VRFPreOut