pub struct SecomCipher { /* private fields */ }Expand description
SECOM cipher implementation.
SECOM is a VIC-derived cipher that uses a single key phrase and a frequency string to initialize its components: a straddling checkerboard and two columnar transpositions (one regular and one disrupted).
Implementations§
Trait Implementations§
Source§impl Block for SecomCipher
impl Block for SecomCipher
Source§fn encrypt(&self, dst: &mut [u8], src: &[u8]) -> usize
fn encrypt(&self, dst: &mut [u8], src: &[u8]) -> usize
Encrypts source data into destination buffer.
This implementation performs:
- Preprocessing (uppercase, space conversion).
- Checkerboard encoding.
- Padding to a multiple of 5.
- First (regular) columnar transposition.
- Second (disrupted) columnar transposition.
Source§fn decrypt(&self, dst: &mut [u8], src: &[u8]) -> usize
fn decrypt(&self, dst: &mut [u8], src: &[u8]) -> usize
Decrypts source data into destination buffer.
This implementation performs:
- Second (disrupted) columnar transposition (reverse).
- First (regular) columnar transposition (reverse).
- Padding removal.
- Checkerboard decoding.
- Postprocessing.
fn block_size(&self) -> usize
Auto Trait Implementations§
impl Freeze for SecomCipher
impl RefUnwindSafe for SecomCipher
impl Send for SecomCipher
impl Sync for SecomCipher
impl Unpin for SecomCipher
impl UnwindSafe for SecomCipher
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