pub struct HkdfAgreement { /* private fields */ }Expand description
Normalized RFC 9231 HKDF invocation, with optional XML-supplied IKM.
RFC 9231 section 2.8.1 permits IKM to be absent when known out of band. Salt and KA-Nonce are hexadecimal in this profile, not base64. Parsing neither authorizes execution nor selects a security policy.
Implementations§
Source§impl HkdfAgreement
impl HkdfAgreement
Sourcepub fn key_derivation_method(&self) -> &KeyDerivationMethod
pub fn key_derivation_method(&self) -> &KeyDerivationMethod
Borrow normalized parameters without exposing embedded initial key material.
Sourcepub fn derive_key(
&self,
output_len: usize,
external_ikm: Option<&[u8]>,
provider: &dyn CryptoProvider,
budget: &mut KeyEstablishmentBudget<'_>,
) -> Result<Zeroizing<Vec<u8>>, XmlEncError>
pub fn derive_key( &self, output_len: usize, external_ikm: Option<&[u8]>, provider: &dyn CryptoProvider, budget: &mut KeyEstablishmentBudget<'_>, ) -> Result<Zeroizing<Vec<u8>>, XmlEncError>
Derive with XML-supplied IKM or an explicit out-of-band request value. Supplying both is an ambiguous request and is rejected, never overridden.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HkdfAgreement
impl RefUnwindSafe for HkdfAgreement
impl Send for HkdfAgreement
impl Sync for HkdfAgreement
impl Unpin for HkdfAgreement
impl UnsafeUnpin for HkdfAgreement
impl UnwindSafe for HkdfAgreement
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