Skip to main content

AeadWithDefaults

Struct AeadWithDefaults 

Source
pub struct AeadWithDefaults<T>(/* private fields */);
Available on crate feature test_util only.
Expand description

An Aead that that uses the default trait methods.

Trait Implementations§

Source§

impl<T: Aead> Aead for AeadWithDefaults<T>

Source§

const LIFETIME: Lifetime = T::LIFETIME

The lifetime of a cryptographic key.
Source§

const KEY_SIZE: usize = T::KEY_SIZE

Shorthand for KeySize.
Source§

const NONCE_SIZE: usize = T::NONCE_SIZE

Shorthand for NonceSize.
Source§

const OVERHEAD: usize = T::OVERHEAD

Shorthand for Overhead.
Source§

const MAX_PLAINTEXT_SIZE: u64 = T::MAX_PLAINTEXT_SIZE

The maximum size in octets of a plaintext allowed by this Aead (i.e., P_MAX). Read more
Source§

const MAX_ADDITIONAL_DATA_SIZE: u64 = T::MAX_ADDITIONAL_DATA_SIZE

The maximum size in octets of additional data allowed by this Aead (i.e., A_MAX). Read more
Source§

const MAX_CIPHERTEXT_SIZE: u64 = T::MAX_CIPHERTEXT_SIZE

The maximum size in octets of a ciphertext allowed by this Aead (i.e., C_MAX). Read more
Source§

type KeySize = <T as Aead>::KeySize

The size in octets of a key used by this Aead. Read more
Source§

type NonceSize = <T as Aead>::NonceSize

The size in octets of a nonce used by this Aead. Read more
Source§

type Overhead = <T as Aead>::Overhead

The size in octets of authentication overhead added to encrypted plaintexts. Read more
Source§

type Key = <T as Aead>::Key

The key used by the Aead.
Source§

fn new(key: &Self::Key) -> Self

Creates a new Aead.
Source§

fn seal_in_place( &self, nonce: &[u8], data: &mut [u8], tag: &mut [u8], additional_data: &[u8], ) -> Result<(), SealError>

Encrypts and authenticates data in-place. Read more
Source§

fn open_in_place( &self, nonce: &[u8], data: &mut [u8], tag: &[u8], additional_data: &[u8], ) -> Result<(), OpenError>

Decrypts and authenticates data in-place. Read more
Source§

fn seal( &self, dst: &mut [u8], nonce: &[u8], plaintext: &[u8], additional_data: &[u8], ) -> Result<(), SealError>

Encrypts and authenticates plaintext, writing the resulting ciphertext to dst. Read more
Source§

fn open( &self, dst: &mut [u8], nonce: &[u8], ciphertext: &[u8], additional_data: &[u8], ) -> Result<(), OpenError>

Decrypts and authenticates ciphertext, writing the resulting plaintext to dst. Read more
Source§

impl<T: Clone> Clone for AeadWithDefaults<T>

Source§

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

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for AeadWithDefaults<T>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T: Identified> Identified for AeadWithDefaults<T>

Source§

const OID: &'static Oid = T::OID

The algorithm’s OID.

Auto Trait Implementations§

§

impl<T> Freeze for AeadWithDefaults<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for AeadWithDefaults<T>
where T: RefUnwindSafe,

§

impl<T> Send for AeadWithDefaults<T>
where T: Send,

§

impl<T> Sync for AeadWithDefaults<T>
where T: Sync,

§

impl<T> Unpin for AeadWithDefaults<T>
where T: Unpin,

§

impl<T> UnwindSafe for AeadWithDefaults<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V