[−][src]Trait yaca::prelude::ContextWithXcmEncryptProperties
Implementation of GCM/CCM properties for Encrypt
/Seal
Required methods
fn set_property_ccm_aad(
&self,
ccm_aad: &[u8],
plaintext_len: usize
) -> Result<()>
&self,
ccm_aad: &[u8],
plaintext_len: usize
) -> Result<()>
Sets the CCM Additional Authentication Data
- AAD length can have any positive value.
- The total plaintext length must be passed.
- Set after
EncryptContext::initialize()
/SealContext::initialize()
and beforeEncryptContext::update()
/SealContext::update()
. - See
BlockCipherMode::Ccm
for more information.
Provided methods
fn set_property_gcm_tag_len(&self, gcm_tag_len: usize) -> Result<()>
Sets the GCM tag length (in bytes)
- Supported tag lengths: 4, 8, 12, 13, 14, 15, 16.
- Set after
EncryptContext::finalize()
/SealContext::finalize()
and beforeCtxXcmEnc::get_property_gcm_tag()
. - See
BlockCipherMode::Gcm
for more information.
fn get_property_gcm_tag(&self) -> Result<Vec<u8>>
Gets the GCM tag
- Get after
EncryptContext::finalize()
/SealContext::finalize()
. - See
BlockCipherMode::Gcm
for more information.
fn set_property_gcm_aad(&self, gcm_aad: &[u8]) -> Result<()>
Sets the GCM Additional Authentication Data
- AAD length can have any positive value.
- Set after
EncryptContext::initialize()
/SealContext::initialize()
and beforeEncryptContext::update()
/SealContext::update()
inEncryption
/Seal
operation. - See
BlockCipherMode::Gcm
for more information.
fn set_property_ccm_tag_len(&self, ccm_tag_len: usize) -> Result<()>
Sets the CCM Tag length in bytes
- Supported tag lengths: 4-16 bytes in steps of 2 bytes.
- Set after
EncryptContext::initialize()
/SealContext::initialize()
and beforeEncryptContext::update()
/SealContext::update()
. - See
BlockCipherMode::Ccm
for more information.
fn get_property_ccm_tag(&self) -> Result<Vec<u8>>
Gets the CCM tag
- Get after
EncryptContext::finalize()
/SealContext::finalize()
. - See
BlockCipherMode::Ccm
for more information.