Struct nettle::cipher::insecure_do_not_use::ArcTwo
source · pub struct ArcTwo { /* private fields */ }
Expand description
Ron Rivest’s RC2 block cipher defined RFC 2268.
Note
RC2 is no longer considered a secure cipher. Only use it for legacy applications.
Implementations§
source§impl ArcTwo
impl ArcTwo
sourcepub fn with_key(key: &[u8]) -> Self
pub fn with_key(key: &[u8]) -> Self
Creates a new instance with key
that can be used for both encryption and decryption.
sourcepub fn with_key_ekb(key: &[u8], ekb: u32) -> Self
pub fn with_key_ekb(key: &[u8], ekb: u32) -> Self
Creates a new instance with key
that can be used for both encryption and decryption.
The ekb
parameter can be used to limit the effective key
size to ekb
bits. A value of 0
is handled as 1024
.
Trait Implementations§
source§impl Cipher for ArcTwo
impl Cipher for ArcTwo
source§const BLOCK_SIZE: usize = 8usize
const BLOCK_SIZE: usize = 8usize
Block size in bytes.
source§fn with_encrypt_key(key: &[u8]) -> Result<ArcTwo>
fn with_encrypt_key(key: &[u8]) -> Result<ArcTwo>
Creates a new cipher instance for encryption. Read more
source§fn with_decrypt_key(key: &[u8]) -> Result<ArcTwo>
fn with_decrypt_key(key: &[u8]) -> Result<ArcTwo>
Creates a new cipher instance for decryption. Read more
source§fn context(&mut self) -> *mut c_void
fn context(&mut self) -> *mut c_void
Returns a pointer to the C context struct of the cipher instance. Read more
source§fn raw_encrypt_function() -> RawCipherFunctionPointer
fn raw_encrypt_function() -> RawCipherFunctionPointer
Pointer to the *_encrypt C function. Read more
source§fn raw_decrypt_function() -> RawCipherFunctionPointer
fn raw_decrypt_function() -> RawCipherFunctionPointer
Pointer to the *_decrypt C function. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ArcTwo
impl Send for ArcTwo
impl Sync for ArcTwo
impl Unpin for ArcTwo
impl UnwindSafe for ArcTwo
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