Struct aws_nitro_enclaves_cose::crypto::Openssl
source · pub struct Openssl;
Expand description
Type that implements various cryptographic traits using the OpenSSL library
Trait Implementations§
source§impl Decryption for Openssl
impl Decryption for Openssl
source§fn decrypt_aead(
algo: EncryptionAlgorithm,
key: &[u8],
iv: Option<&[u8]>,
aad: &[u8],
ciphertext: &[u8],
tag: &[u8]
) -> Result<Vec<u8>, CoseError>
fn decrypt_aead( algo: EncryptionAlgorithm, key: &[u8], iv: Option<&[u8]>, aad: &[u8], ciphertext: &[u8], tag: &[u8] ) -> Result<Vec<u8>, CoseError>
Like decrypt
, but for AEAD ciphers such as AES GCM.
Additional Authenticated Data can be provided in the aad
field, and the authentication tag
should be provided in the tag
field.
source§impl Encryption for Openssl
impl Encryption for Openssl
source§fn encrypt_aead(
algo: EncryptionAlgorithm,
key: &[u8],
iv: Option<&[u8]>,
aad: &[u8],
data: &[u8],
tag: &mut [u8]
) -> Result<Vec<u8>, CoseError>
fn encrypt_aead( algo: EncryptionAlgorithm, key: &[u8], iv: Option<&[u8]>, aad: &[u8], data: &[u8], tag: &mut [u8] ) -> Result<Vec<u8>, CoseError>
Like encrypt
, but for AEAD ciphers such as AES GCM.
Additional Authenticated Data can be provided in the aad
field, and the authentication tag
will be copied into the tag
field.
The size of the tag
buffer indicates the required size of the tag. While some ciphers support
a range of tag sizes, it is recommended to pick the maximum size. For AES GCM, this is 16 bytes,
for example.
Auto Trait Implementations§
impl Freeze for Openssl
impl RefUnwindSafe for Openssl
impl Send for Openssl
impl Sync for Openssl
impl Unpin for Openssl
impl UnwindSafe for Openssl
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