pub struct AeadRegistry { /* private fields */ }Expand description
Registry for AEAD algorithms
Implementations§
Source§impl AeadRegistry
impl AeadRegistry
Sourcepub fn register_algorithm<F>(
&self,
algorithm: Algorithm,
constructor: F,
) -> Result<()>
pub fn register_algorithm<F>( &self, algorithm: Algorithm, constructor: F, ) -> Result<()>
Register an algorithm constructor
Sourcepub fn register_plugin(&self, plugin: Box<dyn AeadPlugin>) -> Result<()>
pub fn register_plugin(&self, plugin: Box<dyn AeadPlugin>) -> Result<()>
Register a plugin
Sourcepub fn create_aead(
&self,
algorithm: Algorithm,
) -> Result<Box<dyn AeadWithMetadata>>
pub fn create_aead( &self, algorithm: Algorithm, ) -> Result<Box<dyn AeadWithMetadata>>
Create an AEAD instance for the specified algorithm
Sourcepub fn available_algorithms(&self) -> Vec<Algorithm>
pub fn available_algorithms(&self) -> Vec<Algorithm>
Get available algorithms
Sourcepub fn is_available(&self, algorithm: Algorithm) -> bool
pub fn is_available(&self, algorithm: Algorithm) -> bool
Check if an algorithm is available
Sourcepub fn get_metadata(
&self,
algorithm: Algorithm,
) -> Option<&'static AeadMetadata>
pub fn get_metadata( &self, algorithm: Algorithm, ) -> Option<&'static AeadMetadata>
Get algorithm metadata
Sourcepub fn get_all_metadata(&self) -> Vec<&'static AeadMetadata>
pub fn get_all_metadata(&self) -> Vec<&'static AeadMetadata>
Get all registered algorithms with their metadata
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AeadRegistry
impl RefUnwindSafe for AeadRegistry
impl Send for AeadRegistry
impl Sync for AeadRegistry
impl Unpin for AeadRegistry
impl UnsafeUnpin for AeadRegistry
impl UnwindSafe for AeadRegistry
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