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 Freeze for ArcTwo
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