Struct unsafe_hacspec_examples::sha2::Hash
source · [−]Expand description
Fixed length byte array.
Tuple Fields
0: [U32; 8]
Implementations
sourceimpl Hash
impl Hash
pub fn from_slice<A: SeqTrait<U32>>(input: &A, start: usize, len: usize) -> Self
pub fn concat<A: SeqTrait<U32>>(&self, next: &A) -> Seq<U32>
pub fn from_slice_range<A: SeqTrait<U32>>(input: &A, r: Range<usize>) -> Self
pub fn slice(&self, start_out: usize, len: usize) -> Seq<U32>
pub fn slice_range(&self, r: Range<usize>) -> Seq<U32>
pub fn num_chunks(&self, chunk_size: usize) -> usize
pub fn get_chunk_len(&self, chunk_size: usize, chunk_number: usize) -> usize
pub fn get_chunk(
&self,
chunk_size: usize,
chunk_number: usize
) -> (usize, Seq<U32>)
pub fn set_chunk<A: SeqTrait<U32>>(
self,
chunk_size: usize,
chunk_number: usize,
input: &A
) -> Self
sourceimpl Hash
impl Hash
Warning: declassifies secret integer types.
pub fn declassify_eq(&self, other: &Self) -> bool
sourceimpl Hash
impl Hash
pub fn to_be_bytes(&self) -> Seq<U8>
pub fn to_le_bytes(&self) -> Seq<U8>
Trait Implementations
sourceimpl ModNumeric for Hash
impl ModNumeric for Hash
sourcefn signed_modulo(self, _n: Self) -> Self
fn signed_modulo(self, _n: Self) -> Self
self % n
that always returns a positive integer
sourceimpl Numeric for Hash
impl Numeric for Hash
fn wrap_add(self, rhs: Self) -> Self
fn wrap_sub(self, rhs: Self) -> Self
fn wrap_mul(self, rhs: Self) -> Self
fn wrap_div(self, _rhs: Self) -> Self
fn equal(self, other: Self) -> bool
fn greater_than(self, _other: Self) -> bool
fn greater_than_or_equal(self, _other: Self) -> bool
fn less_than(self, _other: Self) -> bool
fn less_than_or_equal(self, _other: Self) -> bool
fn not_equal_bm(self, _other: Self) -> Self
fn equal_bm(self, _other: Self) -> Self
fn greater_than_bm(self, _other: Self) -> Self
fn greater_than_or_equal_bm(self, _other: Self) -> Self
fn less_than_bm(self, _other: Self) -> Self
fn less_than_or_equal_bm(self, _other: Self) -> Self
sourceimpl SeqTrait<U32> for Hash
impl SeqTrait<U32> for Hash
fn create(x: usize) -> Self
fn len(&self) -> usize
fn iter(&self) -> Iter<'_, U32>
sourcefn update_slice<A: SeqTrait<U32>>(
self,
start_out: usize,
v: &A,
start_in: usize,
len: usize
) -> Self
fn update_slice<A: SeqTrait<U32>>(
self,
start_out: usize,
v: &A,
start_in: usize,
len: usize
) -> Self
Update this sequence with l
elements of v
, starting at start_in
,
at start_out
. Read more
impl Copy for Hash
impl NumericCopy for Hash
Auto Trait Implementations
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more