[][src]Struct ring::aead::LessSafeKey

pub struct LessSafeKey { /* fields omitted */ }

Immutable keys for use in situations where Key and NonceSequence cannot reasonably be used.

Prefer to use Key and NonceSequence when practical.

Methods

impl LessSafeKey[src]

pub fn new(key: UnboundKey) -> Self[src]

Constructs a LessSafeKey from an UnboundKey.

pub fn open_in_place<'in_out, A: AsRef<[u8]>>(
    &self,
    nonce: Nonce,
    aad: Aad<A>,
    in_out: &'in_out mut [u8]
) -> Result<&'in_out mut [u8], Unspecified>
[src]

Like Key::open_in_place(), except it accepts an arbitrary nonce.

pub fn open_within<'in_out, A: AsRef<[u8]>>(
    &self,
    nonce: Nonce,
    aad: Aad<A>,
    in_out: &'in_out mut [u8],
    ciphertext_and_tag: RangeFrom<usize>
) -> Result<&'in_out mut [u8], Unspecified>
[src]

Like Key::open_within(), except it accepts an arbitrary nonce.

pub fn seal_in_place<A: AsRef<[u8]>, InOut: AsMut<[u8]> + for<'in_out> Extend<&'in_out u8>>(
    &self,
    nonce: Nonce,
    aad: Aad<A>,
    in_out: &mut InOut
) -> Result<(), Unspecified>
[src]

Like Key::seal_in_place(), except it accepts an arbitrary nonce.

pub fn algorithm(&self) -> &'static Algorithm[src]

The key's AEAD algorithm.

Trait Implementations

impl Debug for LessSafeKey[src]

Auto Trait Implementations

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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