pub struct UnboundKey {
ctx: AeadCtx,
algorithm: &'static Algorithm,
}Expand description
An AEAD key without a designated role or nonce sequence.
Fields§
§ctx: AeadCtx§algorithm: &'static AlgorithmImplementations§
Source§impl UnboundKey
impl UnboundKey
pub(crate) fn open_within<'in_out>( &self, nonce: Nonce, aad: &[u8], in_out: &'in_out mut [u8], ciphertext_and_tag: RangeFrom<usize>, ) -> Result<&'in_out mut [u8], Unspecified>
pub(crate) fn open_separate_gather( &self, nonce: &Nonce, aad: &[u8], in_ciphertext: &[u8], in_tag: &[u8], out_plaintext: &mut [u8], ) -> Result<(), Unspecified>
pub(crate) fn open_in_place_separate_tag( &self, nonce: &Nonce, aad: &[u8], in_tag: &[u8], in_out: &mut [u8], ) -> Result<(), Unspecified>
Sourcefn open_separate_gather_impl(
&self,
nonce: &Nonce,
aad: &[u8],
in_ciphertext: *const u8,
in_ciphertext_len: usize,
in_tag: &[u8],
out_plaintext: *mut u8,
out_plaintext_len: usize,
) -> Result<(), Unspecified>
fn open_separate_gather_impl( &self, nonce: &Nonce, aad: &[u8], in_ciphertext: *const u8, in_ciphertext_len: usize, in_tag: &[u8], out_plaintext: *mut u8, out_plaintext_len: usize, ) -> Result<(), Unspecified>
Common FFI path for EVP_AEAD_CTX_open_gather-based opening.
in_ciphertext / out_plaintext may alias (exactly, i.e. same base
pointer and length). EVP_AEAD_CTX_open_gather explicitly permits
out == in, which is how open_in_place_separate_tag works.
Callers must ensure:
in_ciphertextis valid for reads ofin_ciphertext_lenbytes.out_plaintextis valid for writes ofout_plaintext_lenbytes.- If the two pointers alias, they must alias exactly (same base, same length).
pub(crate) fn seal_in_place_append_tag<'a, InOut>( &self, nonce: Option<Nonce>, aad: &[u8], in_out: &'a mut InOut, ) -> Result<Nonce, Unspecified>
pub(crate) fn seal_in_place_separate_tag( &self, nonce: Option<Nonce>, aad: &[u8], in_out: &mut [u8], ) -> Result<(Nonce, Tag), Unspecified>
pub(crate) fn seal_in_place_separate_scatter( &self, nonce: Nonce, aad: &[u8], in_out: &mut [u8], extra_in: &[u8], extra_out_and_tag: &mut [u8], ) -> Result<(), Unspecified>
pub(crate) fn check_per_nonce_max_bytes( &self, in_out_len: usize, ) -> Result<(), Unspecified>
fn open_combined( &self, nonce: Nonce, aad: &[u8], in_out: &mut [u8], ) -> Result<(), Unspecified>
fn open_combined_randnonce( &self, nonce: Nonce, aad: &[u8], in_out: &mut [u8], ) -> Result<(), Unspecified>
fn seal_combined<InOut>( &self, nonce: Nonce, aad: &[u8], in_out: &mut InOut, ) -> Result<Nonce, Unspecified>
fn seal_combined_randnonce<InOut>( &self, aad: &[u8], in_out: &mut InOut, ) -> Result<Nonce, Unspecified>
fn seal_separate( &self, nonce: Nonce, aad: &[u8], in_out: &mut [u8], ) -> Result<(Nonce, Tag), Unspecified>
fn seal_separate_randnonce( &self, aad: &[u8], in_out: &mut [u8], ) -> Result<(Nonce, Tag), Unspecified>
Trait Implementations§
Source§impl Debug for UnboundKey
impl Debug for UnboundKey
Source§impl From<AeadCtx> for UnboundKey
impl From<AeadCtx> for UnboundKey
Auto Trait Implementations§
impl Freeze for UnboundKey
impl RefUnwindSafe for UnboundKey
impl Send for UnboundKey
impl Sync for UnboundKey
impl Unpin for UnboundKey
impl UnsafeUnpin for UnboundKey
impl UnwindSafe for UnboundKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more