pub enum KdfContext<'a> {
LegacyDh {
encryption_algorithm: &'a str,
nonce: &'a [u8],
},
Octets(&'a [u8]),
Bits {
bytes: &'a [u8],
bit_len: usize,
},
}Expand description
Provider-neutral context octets or significant bits for key derivation.
Variants§
LegacyDh
XMLEnc 1.1 section 5.6.2.2 legacy DH framing. KeySize is derived from output_len; callers cannot supply a contradictory decimal key width.
Fields
Octets(&'a [u8])
Complete octets, as used by HKDF info and byte-aligned ConcatKDF.
Bits
An MSB-first bit string. Its last octet must have zero unused low bits;
the byte slice must have exactly bit_len.div_ceil(8) octets.
Trait Implementations§
Source§impl<'a> Clone for KdfContext<'a>
impl<'a> Clone for KdfContext<'a>
impl<'a> Copy for KdfContext<'a>
Source§impl<'a> Debug for KdfContext<'a>
impl<'a> Debug for KdfContext<'a>
impl<'a> Eq for KdfContext<'a>
Source§impl<'a> PartialEq for KdfContext<'a>
impl<'a> PartialEq for KdfContext<'a>
impl<'a> StructuralPartialEq for KdfContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for KdfContext<'a>
impl<'a> RefUnwindSafe for KdfContext<'a>
impl<'a> Send for KdfContext<'a>
impl<'a> Sync for KdfContext<'a>
impl<'a> Unpin for KdfContext<'a>
impl<'a> UnsafeUnpin for KdfContext<'a>
impl<'a> UnwindSafe for KdfContext<'a>
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