pub enum InnerStreamCipherAlgorithm {
ArcFour,
Salsa20,
ChaCha20,
Unknown(u32),
}
Expand description
Inner stream cipher identifier used for encrypting protected fields
Variants§
ArcFour
ArcFour algorithm
Salsa20
Salsa20 stream cipher
ChaCha20
ChaCha20 stream cipher
Unknown(u32)
Unknown stream cipher
Implementations§
Source§impl InnerStreamCipherAlgorithm
impl InnerStreamCipherAlgorithm
Sourcepub fn stream_cipher(
self,
key: &[u8],
) -> Result<Box<dyn StreamCipher>, InnerStreamError>
pub fn stream_cipher( self, key: &[u8], ) -> Result<Box<dyn StreamCipher>, InnerStreamError>
Create a stream cipher instance for this algorithm
Trait Implementations§
Source§impl Clone for InnerStreamCipherAlgorithm
impl Clone for InnerStreamCipherAlgorithm
Source§fn clone(&self) -> InnerStreamCipherAlgorithm
fn clone(&self) -> InnerStreamCipherAlgorithm
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 Debug for InnerStreamCipherAlgorithm
impl Debug for InnerStreamCipherAlgorithm
Source§impl From<InnerStreamCipherAlgorithm> for u32
impl From<InnerStreamCipherAlgorithm> for u32
Source§fn from(id: InnerStreamCipherAlgorithm) -> u32
fn from(id: InnerStreamCipherAlgorithm) -> u32
Converts to this type from the input type.
Source§impl From<u32> for InnerStreamCipherAlgorithm
impl From<u32> for InnerStreamCipherAlgorithm
Source§fn from(id: u32) -> InnerStreamCipherAlgorithm
fn from(id: u32) -> InnerStreamCipherAlgorithm
Converts to this type from the input type.
impl Copy for InnerStreamCipherAlgorithm
impl Eq for InnerStreamCipherAlgorithm
impl StructuralPartialEq for InnerStreamCipherAlgorithm
Auto Trait Implementations§
impl Freeze for InnerStreamCipherAlgorithm
impl RefUnwindSafe for InnerStreamCipherAlgorithm
impl Send for InnerStreamCipherAlgorithm
impl Sync for InnerStreamCipherAlgorithm
impl Unpin for InnerStreamCipherAlgorithm
impl UnwindSafe for InnerStreamCipherAlgorithm
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