[][src]Struct vault_rs::secrets::transit::EncryptPayload

pub struct EncryptPayload<'a, 'b, 'c> {
    pub plaintext: &'a [u8],
    pub nonce: Option<&'b [u8]>,
    pub context: Option<&'c [u8]>,
}

A single item to be encrypted

Fields

plaintext: &'a [u8]

Plaintext to be encrypted

nonce: Option<&'b [u8]>

Nonce, if any. This must be provided if convergent encryption is enabled for this key and the key was generated with Vault 0.6.1. Not required for keys created in 0.6.2+. The value must be exactly 96 bits (12 bytes) long and the user must ensure that for any given context (and thus, any given encryption key) this nonce value is never reused.

context: Option<&'c [u8]>

Context, if any. This is required if key derivation is enabled for this key.

Trait Implementations

impl<'a, 'b, 'c> Debug for EncryptPayload<'a, 'b, 'c>[src]

impl<'a, 'b, 'c> Default for EncryptPayload<'a, 'b, 'c>[src]

impl<'a, 'b, 'c> Eq for EncryptPayload<'a, 'b, 'c>[src]

impl<'a, 'b, 'c> PartialEq<EncryptPayload<'a, 'b, 'c>> for EncryptPayload<'a, 'b, 'c>[src]

impl<'a, 'b, 'c> Serialize for EncryptPayload<'a, 'b, 'c>[src]

impl<'a, 'b, 'c> StructuralEq for EncryptPayload<'a, 'b, 'c>[src]

impl<'a, 'b, 'c> StructuralPartialEq for EncryptPayload<'a, 'b, 'c>[src]

Auto Trait Implementations

impl<'a, 'b, 'c> RefUnwindSafe for EncryptPayload<'a, 'b, 'c>

impl<'a, 'b, 'c> Send for EncryptPayload<'a, 'b, 'c>

impl<'a, 'b, 'c> Sync for EncryptPayload<'a, 'b, 'c>

impl<'a, 'b, 'c> Unpin for EncryptPayload<'a, 'b, 'c>

impl<'a, 'b, 'c> UnwindSafe for EncryptPayload<'a, 'b, 'c>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.