Struct hacspec_poly1305::Poly1305Tag
source · [−]Expand description
Fixed length byte array.
Tuple Fields
0: [U8; 16]
Implementations
sourceimpl Poly1305Tag
impl Poly1305Tag
sourceimpl Poly1305Tag
impl Poly1305Tag
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
sourceimpl Poly1305Tag
impl Poly1305Tag
sourceimpl Poly1305Tag
impl Poly1305Tag
sourcepub fn from_hex(s: &str) -> Poly1305Tag
pub fn from_hex(s: &str) -> Poly1305Tag
Read hex string to Bytes.
sourceimpl Poly1305Tag
impl Poly1305Tag
Warning: declassifies secret integer types.
pub fn declassify_eq(&self, other: &Self) -> bool
sourceimpl Poly1305Tag
impl Poly1305Tag
pub fn to_be_bytes(&self) -> Seq<U8>
pub fn to_le_bytes(&self) -> Seq<U8>
sourceimpl Poly1305Tag
impl Poly1305Tag
pub fn from_public_slice(v: &[u8]) -> Poly1305Tag
pub fn to_public_array(&self) -> [u8; 16]
sourcepub fn from_public_array(v: [u8; 16]) -> Poly1305Tag
pub fn from_public_array(v: [u8; 16]) -> Poly1305Tag
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]);
sourceimpl Poly1305Tag
impl Poly1305Tag
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
sourceimpl Add<Poly1305Tag> for Poly1305Tag
impl Add<Poly1305Tag> for Poly1305Tag
Warning: wraps on overflow.
type Output = Poly1305Tag
type Output = Poly1305Tag
The resulting type after applying the +
operator.
sourcefn add(self, rhs: Poly1305Tag) -> Poly1305Tag
fn add(self, rhs: Poly1305Tag) -> Poly1305Tag
Performs the +
operation. Read more
sourceimpl BitAnd<Poly1305Tag> for Poly1305Tag
impl BitAnd<Poly1305Tag> for Poly1305Tag
sourceimpl BitOr<Poly1305Tag> for Poly1305Tag
impl BitOr<Poly1305Tag> for Poly1305Tag
sourceimpl BitXor<Poly1305Tag> for Poly1305Tag
impl BitXor<Poly1305Tag> for Poly1305Tag
sourceimpl Clone for Poly1305Tag
impl Clone for Poly1305Tag
sourcefn clone(&self) -> Poly1305Tag
fn clone(&self) -> Poly1305Tag
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 Poly1305Tag
impl Debug for Poly1305Tag
Warning: declassifies secret integer types.
sourceimpl Default for Poly1305Tag
impl Default for Poly1305Tag
sourceimpl Index<RangeFull> for Poly1305Tag
impl Index<RangeFull> for Poly1305Tag
sourceimpl Index<i32> for Poly1305Tag
impl Index<i32> for Poly1305Tag
sourceimpl Index<u32> for Poly1305Tag
impl Index<u32> for Poly1305Tag
sourceimpl Index<u8> for Poly1305Tag
impl Index<u8> for Poly1305Tag
sourceimpl Index<usize> for Poly1305Tag
impl Index<usize> for Poly1305Tag
sourceimpl IndexMut<i32> for Poly1305Tag
impl IndexMut<i32> for Poly1305Tag
sourceimpl IndexMut<u32> for Poly1305Tag
impl IndexMut<u32> for Poly1305Tag
sourceimpl IndexMut<u8> for Poly1305Tag
impl IndexMut<u8> for Poly1305Tag
sourceimpl IndexMut<usize> for Poly1305Tag
impl IndexMut<usize> for Poly1305Tag
sourceimpl ModNumeric for Poly1305Tag
impl ModNumeric for Poly1305Tag
sourcefn signed_modulo(self, _n: Self) -> Self
fn signed_modulo(self, _n: Self) -> Self
self % n
that always returns a positive integer
sourceimpl Mul<Poly1305Tag> for Poly1305Tag
impl Mul<Poly1305Tag> for Poly1305Tag
Warning: wraps on overflow.
type Output = Poly1305Tag
type Output = Poly1305Tag
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: Poly1305Tag) -> Poly1305Tag
fn mul(self, rhs: Poly1305Tag) -> Poly1305Tag
Performs the *
operation. Read more
sourceimpl Not for Poly1305Tag
impl Not for Poly1305Tag
sourceimpl Numeric for Poly1305Tag
impl Numeric for Poly1305Tag
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<Poly1305Tag> for Poly1305Tag
impl Rem<Poly1305Tag> for Poly1305Tag
Warning: panics on division by 0.
type Output = Poly1305Tag
type Output = Poly1305Tag
The resulting type after applying the %
operator.
sourcefn rem(self, _rhs: Poly1305Tag) -> Poly1305Tag
fn rem(self, _rhs: Poly1305Tag) -> Poly1305Tag
Performs the %
operation. Read more
sourceimpl SeqTrait<U8> for Poly1305Tag
impl SeqTrait<U8> for Poly1305Tag
fn create(x: usize) -> Self
fn len(&self) -> usize
fn iter(&self) -> Iter<'_, U8>
sourcefn update_slice<A: SeqTrait<U8>>(
self,
start_out: usize,
v: &A,
start_in: usize,
len: usize
) -> Self
fn update_slice<A: SeqTrait<U8>>(
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 Poly1305Tag
impl Shl<usize> for Poly1305Tag
sourceimpl Shr<usize> for Poly1305Tag
impl Shr<usize> for Poly1305Tag
sourceimpl Sub<Poly1305Tag> for Poly1305Tag
impl Sub<Poly1305Tag> for Poly1305Tag
Warning: wraps on underflow.
type Output = Poly1305Tag
type Output = Poly1305Tag
The resulting type after applying the -
operator.
sourcefn sub(self, rhs: Poly1305Tag) -> Poly1305Tag
fn sub(self, rhs: Poly1305Tag) -> Poly1305Tag
Performs the -
operation. Read more
impl Copy for Poly1305Tag
impl NumericCopy for Poly1305Tag
Auto Trait Implementations
impl RefUnwindSafe for Poly1305Tag
impl Send for Poly1305Tag
impl Sync for Poly1305Tag
impl Unpin for Poly1305Tag
impl UnwindSafe for Poly1305Tag
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