Struct ring::aead::LessSafeKey [−][src]
pub struct LessSafeKey { /* fields omitted */ }
Expand description
Immutable keys for use in situations where OpeningKey
/SealingKey
and
NonceSequence
cannot reasonably be used.
Prefer to use OpeningKey
/SealingKey
and NonceSequence
when practical.
Implementations
Constructs a LessSafeKey
.
pub fn open_in_place<'in_out, A>(
&self,
nonce: Nonce,
aad: Aad<A>,
in_out: &'in_out mut [u8]
) -> Result<&'in_out mut [u8], Unspecified> where
A: AsRef<[u8]>,
pub fn open_in_place<'in_out, A>(
&self,
nonce: Nonce,
aad: Aad<A>,
in_out: &'in_out mut [u8]
) -> Result<&'in_out mut [u8], Unspecified> where
A: AsRef<[u8]>,
Like [OpeningKey::open_in_place()
], except it accepts an arbitrary nonce.
nonce
must be unique for every use of the key to open data.
pub fn open_within<'in_out, A>(
&self,
nonce: Nonce,
aad: Aad<A>,
in_out: &'in_out mut [u8],
ciphertext_and_tag: RangeFrom<usize>
) -> Result<&'in_out mut [u8], Unspecified> where
A: AsRef<[u8]>,
pub fn open_within<'in_out, A>(
&self,
nonce: Nonce,
aad: Aad<A>,
in_out: &'in_out mut [u8],
ciphertext_and_tag: RangeFrom<usize>
) -> Result<&'in_out mut [u8], Unspecified> where
A: AsRef<[u8]>,
Like [OpeningKey::open_within()
], except it accepts an arbitrary nonce.
nonce
must be unique for every use of the key to open data.
Like [SealingKey::seal_in_place_append_tag()
], except it accepts an
arbitrary nonce.
nonce
must be unique for every use of the key to seal data.
Like SealingKey::seal_in_place_separate_tag()
, except it accepts an
arbitrary nonce.
nonce
must be unique for every use of the key to seal data.