CTR mode functional.

This commit is contained in:
Caleb Garrett 2024-02-14 22:38:05 -05:00
parent 72e4cacd91
commit 565acdf243

View file

@ -100,8 +100,8 @@ impl<'d, T: Instance> Cryp<'d, T> {
panic!("IV length must be 128 bits for CBC."); panic!("IV length must be 128 bits for CBC.");
} else if (mode == Mode::CCM) && (ivlen != 128) { } else if (mode == Mode::CCM) && (ivlen != 128) {
panic!("IV length must be 128 bits for CCM."); panic!("IV length must be 128 bits for CCM.");
} else if (mode == Mode::CTR) && (ivlen != 64) { } else if (mode == Mode::CTR) && (ivlen != 128) {
panic!("IV length must be 64 bits for CTR."); panic!("IV length must be 128 bits for CTR.");
} else if (mode == Mode::GCM) && (ivlen != 96) { } else if (mode == Mode::GCM) && (ivlen != 96) {
panic!("IV length must be 96 bits for GCM."); panic!("IV length must be 96 bits for GCM.");
} else if (mode == Mode::GMAC) && (ivlen != 96) { } else if (mode == Mode::GMAC) && (ivlen != 96) {