pub struct Sho { /* private fields */ }Implementations§
Source§impl Sho
impl Sho
Sourcepub fn new(label: &[u8], data: &[u8]) -> Self
pub fn new(label: &[u8], data: &[u8]) -> Self
Creates a Sho and immediately absorbs data and ratchets.
This is exactly equivalent to calling Sho::new_seed followed by
Sho::absorb_and_ratchet. Meant for when you’re not doing any other absorbing.
pub fn new_seed(label: &[u8]) -> Self
pub fn absorb_and_ratchet(&mut self, data: &[u8])
pub fn squeeze(&mut self, outlen: usize) -> Vec<u8> ⓘ
pub fn squeeze_as_array<const N: usize>(&mut self) -> [u8; N]
pub fn get_point(&mut self) -> RistrettoPoint
pub fn get_point_single_elligator(&mut self) -> RistrettoPoint
pub fn get_scalar(&mut self) -> Scalar
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sho
impl RefUnwindSafe for Sho
impl Send for Sho
impl Sync for Sho
impl Unpin for Sho
impl UnwindSafe for Sho
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> 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