pub struct GcmParams<'a> { /* private fields */ }
Expand description
Parameters for AES-GCM.
Implementations§
source§impl<'a> GcmParams<'a>
impl<'a> GcmParams<'a>
sourcepub fn new(iv: &'a [u8], aad: &'a [u8], tag_bits: Ulong) -> Self
pub fn new(iv: &'a [u8], aad: &'a [u8], tag_bits: Ulong) -> Self
Construct GCM parameters.
§Arguments
iv
- The initialization vector. This must be non-empty. In PKCS#11
2.40, the maximum length of the IV is 256 bytes. A 12-byte IV may be
processed more efficiently than other lengths.
aad
- The additional authenticated data. This data is authenticated
but not encrypted. This may be between 0 and 2^32-1 bytes.
tag_bits
- The length, in bits, of the authentication tag. Must
be between 0 and 128. The tag is appended to the end of the
ciphertext.
§Panics
This function panics if the length of iv
or aad
does not
fit into an Ulong.
Trait Implementations§
impl<'a> Copy for GcmParams<'a>
Auto Trait Implementations§
impl<'a> Freeze for GcmParams<'a>
impl<'a> RefUnwindSafe for GcmParams<'a>
impl<'a> !Send for GcmParams<'a>
impl<'a> !Sync for GcmParams<'a>
impl<'a> Unpin for GcmParams<'a>
impl<'a> UnwindSafe for GcmParams<'a>
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