Struct hacspec_aes_jazz::PBytes256
source · Expand description
Fixed length byte array.
Tuple Fields§
§0: [u8; 256]Implementations§
source§impl PBytes256
impl PBytes256
pub fn from_slice<A: SeqTrait<u8>>(input: &A, start: usize, len: usize) -> Self
pub fn concat<A: SeqTrait<u8>>(&self, next: &A) -> Seq<u8>
pub fn from_slice_range<A: SeqTrait<u8>>(input: &A, r: Range<usize>) -> Self
pub fn slice(&self, start_out: usize, len: usize) -> Seq<u8>
pub fn slice_range(&self, r: Range<usize>) -> Seq<u8>
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<u8>)
pub fn set_chunk<A: SeqTrait<u8>>(
self,
chunk_size: usize,
chunk_number: usize,
input: &A
) -> Self
source§impl PBytes256
impl PBytes256
pub fn to_be_u32s(&self) -> Seq<u32>
pub fn to_le_u32s(&self) -> Seq<u32>
pub fn to_be_u64s(&self) -> Seq<u64>
pub fn to_le_u64s(&self) -> Seq<u64>
pub fn to_u128s_be(&self) -> Seq<u128>
pub fn to_u128s_le(&self) -> Seq<u128>
pub fn to_hex(&self) -> String
Trait Implementations§
source§impl ModNumeric for PBytes256
impl ModNumeric for PBytes256
source§fn mul_mod(self, rhs: Self, n: Self) -> Self
fn mul_mod(self, rhs: Self, n: Self) -> Self
(self * rhs) % n (coefficient-wise)
Note that the multiplication is wrapping.
source§fn pow_mod(self, exp: Self, n: Self) -> Self
fn pow_mod(self, exp: Self, n: Self) -> Self
(self ^ exp) % n (coefficient-wise)
Note that the exponentiation is wrapping.
source§fn signed_modulo(self, n: Self) -> Self
fn signed_modulo(self, n: Self) -> Self
self % n (coefficient-wise)
source§impl Numeric for PBytes256
impl Numeric for PBytes256
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
source§impl Ord for PBytes256
impl Ord for PBytes256
source§impl PartialOrd<PBytes256> for PBytes256
impl PartialOrd<PBytes256> for PBytes256
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more