#[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 duplicate 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
impl Copy for TokenPreimage
Auto Trait Implementations§
impl Freeze for TokenPreimage
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