pub struct KeyingMaterialExporter { /* private fields */ }
Expand description
An object of this type can export keying material.
Implementations§
Source§impl KeyingMaterialExporter
impl KeyingMaterialExporter
Sourcepub fn derive<T: AsMut<[u8]>>(
&self,
label: &[u8],
context: Option<&[u8]>,
output: T,
) -> Result<T, Error>
pub fn derive<T: AsMut<[u8]>>( &self, label: &[u8], context: Option<&[u8]>, output: T, ) -> Result<T, Error>
Derives key material from the agreed connection secrets.
This function fills in output
with output.len()
bytes of key
material derived from a master connection secret using label
and context
for diversification. Ownership of the buffer is taken
by the function and returned via the Ok result to ensure no key
material leaks if the function fails.
See RFC5705 for more details on what this does and is for. In
other libraries this is often named SSL_export_keying_material()
or SslExportKeyingMaterial()
.
This function is not meaningful if output.len()
is zero and will
return an error in that case.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyingMaterialExporter
impl !RefUnwindSafe for KeyingMaterialExporter
impl Send for KeyingMaterialExporter
impl Sync for KeyingMaterialExporter
impl Unpin for KeyingMaterialExporter
impl !UnwindSafe for KeyingMaterialExporter
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