Struct unsafe_hacspec_examples::sha2::RoundConstantsTable
source · [−]Expand description
Fixed length byte array.
Tuple Fields
0: [U32; 64]
Implementations
sourceimpl RoundConstantsTable
impl RoundConstantsTable
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 RoundConstantsTable
impl RoundConstantsTable
sourcepub fn from_hex(s: &str) -> RoundConstantsTable
pub fn from_hex(s: &str) -> RoundConstantsTable
Read hex string to Bytes.
sourceimpl RoundConstantsTable
impl RoundConstantsTable
Warning: declassifies secret integer types.
pub fn declassify_eq(&self, other: &Self) -> bool
sourceimpl RoundConstantsTable
impl RoundConstantsTable
pub fn to_be_bytes(&self) -> Seq<U8>
pub fn to_le_bytes(&self) -> Seq<U8>
sourceimpl RoundConstantsTable
impl RoundConstantsTable
pub fn from_public_slice(v: &[u32]) -> RoundConstantsTable
pub fn to_public_array(&self) -> [u32; 64]
sourcepub fn from_public_array(v: [u32; 64]) -> RoundConstantsTable
pub fn from_public_array(v: [u32; 64]) -> RoundConstantsTable
Create an array from a regular Rust array.
Examples
use hacspec_lib::prelude::*;
bytes!(Block, 5);
let b = Block::from_public_array([1, 2, 3, 4, 5]);
Trait Implementations
sourceimpl Add<RoundConstantsTable> for RoundConstantsTable
impl Add<RoundConstantsTable> for RoundConstantsTable
Warning: wraps on overflow.
type Output = RoundConstantsTable
type Output = RoundConstantsTable
The resulting type after applying the +
operator.
sourcefn add(self, rhs: RoundConstantsTable) -> RoundConstantsTable
fn add(self, rhs: RoundConstantsTable) -> RoundConstantsTable
Performs the +
operation. Read more
sourceimpl Clone for RoundConstantsTable
impl Clone for RoundConstantsTable
sourcefn clone(&self) -> RoundConstantsTable
fn clone(&self) -> RoundConstantsTable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RoundConstantsTable
impl Debug for RoundConstantsTable
Warning: declassifies secret integer types.
sourceimpl Default for RoundConstantsTable
impl Default for RoundConstantsTable
sourceimpl Index<RangeFull> for RoundConstantsTable
impl Index<RangeFull> for RoundConstantsTable
sourceimpl Index<i32> for RoundConstantsTable
impl Index<i32> for RoundConstantsTable
sourceimpl Index<u32> for RoundConstantsTable
impl Index<u32> for RoundConstantsTable
sourceimpl Index<u8> for RoundConstantsTable
impl Index<u8> for RoundConstantsTable
sourceimpl Index<usize> for RoundConstantsTable
impl Index<usize> for RoundConstantsTable
sourceimpl IndexMut<i32> for RoundConstantsTable
impl IndexMut<i32> for RoundConstantsTable
sourceimpl IndexMut<u32> for RoundConstantsTable
impl IndexMut<u32> for RoundConstantsTable
sourceimpl IndexMut<u8> for RoundConstantsTable
impl IndexMut<u8> for RoundConstantsTable
sourceimpl IndexMut<usize> for RoundConstantsTable
impl IndexMut<usize> for RoundConstantsTable
sourceimpl ModNumeric for RoundConstantsTable
impl ModNumeric for RoundConstantsTable
sourcefn signed_modulo(self, _n: Self) -> Self
fn signed_modulo(self, _n: Self) -> Self
self % n
that always returns a positive integer
sourceimpl Mul<RoundConstantsTable> for RoundConstantsTable
impl Mul<RoundConstantsTable> for RoundConstantsTable
Warning: wraps on overflow.
type Output = RoundConstantsTable
type Output = RoundConstantsTable
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: RoundConstantsTable) -> RoundConstantsTable
fn mul(self, rhs: RoundConstantsTable) -> RoundConstantsTable
Performs the *
operation. Read more
sourceimpl Not for RoundConstantsTable
impl Not for RoundConstantsTable
sourceimpl Numeric for RoundConstantsTable
impl Numeric for RoundConstantsTable
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 Rem<RoundConstantsTable> for RoundConstantsTable
impl Rem<RoundConstantsTable> for RoundConstantsTable
Warning: panics on division by 0.
type Output = RoundConstantsTable
type Output = RoundConstantsTable
The resulting type after applying the %
operator.
sourcefn rem(self, _rhs: RoundConstantsTable) -> RoundConstantsTable
fn rem(self, _rhs: RoundConstantsTable) -> RoundConstantsTable
Performs the %
operation. Read more
sourceimpl SeqTrait<U32> for RoundConstantsTable
impl SeqTrait<U32> for RoundConstantsTable
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
sourceimpl Shl<usize> for RoundConstantsTable
impl Shl<usize> for RoundConstantsTable
sourceimpl Shr<usize> for RoundConstantsTable
impl Shr<usize> for RoundConstantsTable
sourceimpl Sub<RoundConstantsTable> for RoundConstantsTable
impl Sub<RoundConstantsTable> for RoundConstantsTable
Warning: wraps on underflow.
type Output = RoundConstantsTable
type Output = RoundConstantsTable
The resulting type after applying the -
operator.
sourcefn sub(self, rhs: RoundConstantsTable) -> RoundConstantsTable
fn sub(self, rhs: RoundConstantsTable) -> RoundConstantsTable
Performs the -
operation. Read more
impl Copy for RoundConstantsTable
impl NumericCopy for RoundConstantsTable
Auto Trait Implementations
impl RefUnwindSafe for RoundConstantsTable
impl Send for RoundConstantsTable
impl Sync for RoundConstantsTable
impl Unpin for RoundConstantsTable
impl UnwindSafe for RoundConstantsTable
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