Struct challenge_bypass_ristretto::voprf::TokenPreimage
source · #[repr(C)]pub struct TokenPreimage([u8; 64]);
Expand description
A TokenPreimage
is a slice of bytes which can be hashed to a RistrettoPoint
.
The hash function must ensure the discrete log with respect to other points is unknown.
In this construction RistrettoPoint::from_uniform_bytes
is used as the hash function.
Tuple Fields§
§0: [u8; 64]
Implementations§
source§impl TokenPreimage
impl TokenPreimage
pub(crate) fn T(&self) -> RistrettoPoint
fn bytes_length_error() -> TokenError
sourcepub fn from_bytes(bytes: &[u8]) -> Result<TokenPreimage, TokenError>
pub fn from_bytes(bytes: &[u8]) -> Result<TokenPreimage, TokenError>
Construct a TokenPreimage
from a slice of bytes.
Trait Implementations§
source§impl Clone for TokenPreimage
impl Clone for TokenPreimage
source§fn clone(&self) -> TokenPreimage
fn clone(&self) -> TokenPreimage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TokenPreimage
impl Debug for TokenPreimage
source§impl PartialEq for TokenPreimage
impl PartialEq for TokenPreimage
source§fn eq(&self, other: &TokenPreimage) -> bool
fn eq(&self, other: &TokenPreimage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TokenPreimage
Auto Trait Implementations§
impl RefUnwindSafe for TokenPreimage
impl Send for TokenPreimage
impl Sync for TokenPreimage
impl Unpin for TokenPreimage
impl UnwindSafe for TokenPreimage
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