pub struct KeyDerivationManager { /* private fields */ }Expand description
密钥派生(HKDF)门面。
Implementations§
Source§impl KeyDerivationManager
impl KeyDerivationManager
pub fn new( registry: Registry<Box<dyn KeyDerivation>>, default_identifier: impl Into<String>, ) -> Result<Self>
pub fn derive( &self, ikm: &[u8], salt: &[u8], length: usize, info: &[u8], ) -> Result<Vec<u8>>
pub fn derive_with( &self, identifier: &str, ikm: &[u8], salt: &[u8], length: usize, info: &[u8], ) -> Result<Vec<u8>>
pub fn registry(&self) -> &Registry<Box<dyn KeyDerivation>>
pub fn registry_mut(&mut self) -> &mut Registry<Box<dyn KeyDerivation>>
pub fn default_identifier(&self) -> &str
pub fn set_default_identifier( &mut self, identifier: impl Into<String>, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for KeyDerivationManager
impl !UnwindSafe for KeyDerivationManager
impl Freeze for KeyDerivationManager
impl Send for KeyDerivationManager
impl Sync for KeyDerivationManager
impl Unpin for KeyDerivationManager
impl UnsafeUnpin for KeyDerivationManager
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