pub enum CryptoAlgorithm {
XC20P,
A256GCM,
A256CBC,
}Expand description
Pluggable closure generator enum, which creates instance of crypto function based on selected algorithm types.
§Attention:
Immutable by design and should be instance per invocation to make sure no sensitive data is been stored in memory longer than necessary. Underlying algorithms are implemented by Rust-crypto crate family.
Allowed (and implemented) cryptographical algorithms (JWA). According to spec
Variants§
Trait Implementations§
Source§impl Clone for CryptoAlgorithm
impl Clone for CryptoAlgorithm
Source§fn clone(&self) -> CryptoAlgorithm
fn clone(&self) -> CryptoAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Cypher for CryptoAlgorithm
impl Cypher for CryptoAlgorithm
Source§fn encryptor(&self) -> SymmetricCypherMethod
fn encryptor(&self) -> SymmetricCypherMethod
Generates + invokes crypto of SymmetricCypherMethod which performs encryption.
Algorithm selected is based on struct’s CryptoAlgorithm property.
Source§fn decrypter(&self) -> SymmetricCypherMethod
fn decrypter(&self) -> SymmetricCypherMethod
Generates + invokes crypto of SymmetricCypherMethod which performs decryption.
Algorithm selected is based on struct’s CryptoAlgorithm property.
Source§fn asymmetric_encryptor(&self) -> AsymmetricCypherMethod
fn asymmetric_encryptor(&self) -> AsymmetricCypherMethod
Not implemented - no use case atm…
Source§impl TryFrom<&String> for CryptoAlgorithm
impl TryFrom<&String> for CryptoAlgorithm
impl Copy for CryptoAlgorithm
Auto Trait Implementations§
impl Freeze for CryptoAlgorithm
impl RefUnwindSafe for CryptoAlgorithm
impl Send for CryptoAlgorithm
impl Sync for CryptoAlgorithm
impl Unpin for CryptoAlgorithm
impl UnsafeUnpin for CryptoAlgorithm
impl UnwindSafe for CryptoAlgorithm
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