pub struct CtByteArray<const N: usize>(/* private fields */);Expand description
A byte array of length N for which comparisons are performed in constant time.
§Limitations
It is possible to avoid constant time comparisons here, just by using the
as_ref() and as_mut() methods. They should therefore be approached with
some caution.
(The decision to avoid implementing Deref/DerefMut is deliberate.)
Trait Implementations§
Source§impl<const N: usize> Clone for CtByteArray<N>
impl<const N: usize> Clone for CtByteArray<N>
Source§fn clone(&self) -> CtByteArray<N>
fn clone(&self) -> CtByteArray<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> ConstantTimeEq for CtByteArray<N>
impl<const N: usize> ConstantTimeEq for CtByteArray<N>
Source§impl<const N: usize> Debug for CtByteArray<N>
impl<const N: usize> Debug for CtByteArray<N>
Source§impl<const N: usize> From<CtByteArray<N>> for [u8; N]
impl<const N: usize> From<CtByteArray<N>> for [u8; N]
Source§fn from(value: CtByteArray<N>) -> Self
fn from(value: CtByteArray<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> HasMemoryCostStructural for CtByteArray<N>
impl<const N: usize> HasMemoryCostStructural for CtByteArray<N>
Source§fn indirect_memory_cost(&self, et: EnabledToken) -> usize
fn indirect_memory_cost(&self, et: EnabledToken) -> usize
Memory cost of data stored out-of-line Read more
Source§impl<const N: usize> Hash for CtByteArray<N>
impl<const N: usize> Hash for CtByteArray<N>
Source§impl<const N: usize> Ord for CtByteArray<N>
impl<const N: usize> Ord for CtByteArray<N>
Source§impl<const N: usize> PartialEq for CtByteArray<N>
impl<const N: usize> PartialEq for CtByteArray<N>
Source§impl<const N: usize> PartialOrd for CtByteArray<N>
impl<const N: usize> PartialOrd for CtByteArray<N>
Source§impl<const N: usize> Zeroize for CtByteArray<N>
impl<const N: usize> Zeroize for CtByteArray<N>
impl<const N: usize> Copy for CtByteArray<N>
impl<const N: usize> Eq for CtByteArray<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for CtByteArray<N>
impl<const N: usize> RefUnwindSafe for CtByteArray<N>
impl<const N: usize> Send for CtByteArray<N>
impl<const N: usize> Sync for CtByteArray<N>
impl<const N: usize> Unpin for CtByteArray<N>
impl<const N: usize> UnsafeUnpin for CtByteArray<N>
impl<const N: usize> UnwindSafe for CtByteArray<N>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
impl<T> HasMemoryCost for Twhere
T: HasMemoryCostStructural,
Source§fn memory_cost(&self, et: EnabledToken) -> usize
fn memory_cost(&self, et: EnabledToken) -> usize
Returns the memory cost of
self, in bytes Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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