Struct CtOutput

pub struct CtOutput<T: OutputSizeUser> { /* private fields */ }

Fixed size output value which provides a safe Eq implementation that runs in constant time.

It is useful for implementing Message Authentication Codes (MACs).

Implementations

impl<T: OutputSizeUser> CtOutput<T>

fn new(bytes: Output<T>) -> Self

Create a new CtOutput value.

fn as_bytes(&self) -> &Output<T>

Get reference to the inner Output array this type wraps.

fn into_bytes(&self) -> Output<T>

Get the inner Output array this type wraps.

Trait Implementations

impl<'a, T: OutputSizeUser> From<&'a Array<u8, <T as OutputSizeUser>::OutputSize>> for CtOutput<T>

fn from(bytes: &'a Output<T>) -> Self

impl<T: Clone + OutputSizeUser> Clone for CtOutput<T>

fn clone(&self) -> CtOutput<T>

impl<T: OutputSizeUser> Debug for CtOutput<T>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<T: OutputSizeUser> Drop for CtOutput<T>

fn drop(&mut self)

impl<T: OutputSizeUser> Eq for CtOutput<T>

impl<T: OutputSizeUser> From<Array<u8, <T as OutputSizeUser>::OutputSize>> for CtOutput<T>

fn from(bytes: Output<T>) -> Self

impl<T: OutputSizeUser> PartialEq for CtOutput<T>

fn eq(&self, other: &CtOutput<T>) -> bool

impl<T: OutputSizeUser> ZeroizeOnDrop for CtOutput<T>

Auto Trait Implementations

impl<T> Freeze for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: Freeze,

impl<T> RefUnwindSafe for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: RefUnwindSafe,

impl<T> Send for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: Send,

impl<T> Sync for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: Sync,

impl<T> Unpin for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: Unpin,

impl<T> UnsafeUnpin for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: UnsafeUnpin,

impl<T> UnwindSafe for CtOutput<T> where Array<u8, <T as OutputSizeUser>::OutputSize>: UnwindSafe,

Blanket Implementations

impl<T> Any for CtOutput<T> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for CtOutput<T> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for CtOutput<T> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for CtOutput<T> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for CtOutput<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Same for CtOutput<T>

type Output = T;

impl<T> ToOwned for CtOutput<T> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for CtOutput<T> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for CtOutput<T> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for CtOutput<T> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>