pub struct ChaChaParameters {
pub nonce: Option<[u8; 12]>,
pub counter: Option<[u8; 4]>,
pub aad: Option<String>,
}Expand description
Request/wire data for the RFC 9231 ChaCha profiles, not policy. A missing nonce is only allowed in an encryption template; decryption requires an explicit nonce, and encryption generates it through its provider.
Fields§
§nonce: Option<[u8; 12]>96-bit nonce encoded as hexBinary in EncryptionMethod.
counter: Option<[u8; 4]>Raw ChaCha’s four little-endian counter bytes; absent for Poly1305.
aad: Option<String>Poly1305 additional authenticated data: UTF-8 XML text, not base64.
Implementations§
Source§impl ChaChaParameters
impl ChaChaParameters
Sourcepub fn borrowed(&self) -> ChaChaParametersRef<'_>
pub fn borrowed(&self) -> ChaChaParametersRef<'_>
Borrow metadata for cryptographic dispatch and serialization without copying AAD when the operation supplies a generated nonce.
Sourcepub fn validate(
&self,
algorithm: DataEncryptionAlgorithm,
) -> Result<(), XmlEncError>
pub fn validate( &self, algorithm: DataEncryptionAlgorithm, ) -> Result<(), XmlEncError>
Check the selected profile before any resolver or provider work.
Trait Implementations§
Source§impl Clone for ChaChaParameters
impl Clone for ChaChaParameters
Source§impl Debug for ChaChaParameters
impl Debug for ChaChaParameters
Source§impl Default for ChaChaParameters
impl Default for ChaChaParameters
impl Eq for ChaChaParameters
Source§impl PartialEq for ChaChaParameters
impl PartialEq for ChaChaParameters
impl StructuralPartialEq for ChaChaParameters
Auto Trait Implementations§
impl Freeze for ChaChaParameters
impl RefUnwindSafe for ChaChaParameters
impl Send for ChaChaParameters
impl Sync for ChaChaParameters
impl Unpin for ChaChaParameters
impl UnsafeUnpin for ChaChaParameters
impl UnwindSafe for ChaChaParameters
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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