Skip to content

Commit

Permalink
twofish: Derive Clone for Twofish. (#287)
Browse files Browse the repository at this point in the history
This aligns Twofish with AES.  Among other things, it allows its use
with EAX with requires Clone.

Co-authored-by: Justus Winter <teythoon@avior.uberspace.de>
  • Loading branch information
teythoon and Justus Winter committed Sep 15, 2021
1 parent 2d85d97 commit 859ca00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions twofish/src/lib.rs
Expand Up @@ -25,6 +25,7 @@ use crate::consts::{MDS_POLY, QBOX, QORD, RS, RS_POLY};
type Block = GenericArray<u8, U16>;

/// Twofish block cipher
#[derive(Clone)]
pub struct Twofish {
s: [u8; 16], // S-box key
k: [u32; 40], // Subkeys
Expand Down

0 comments on commit 859ca00

Please sign in to comment.