diff options
-rw-r--r-- | openpgp/src/crypto/aead.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs index 36a2baa8..3d55b0ab 100644 --- a/openpgp/src/crypto/aead.rs +++ b/openpgp/src/crypto/aead.rs @@ -804,6 +804,8 @@ mod tests { fn roundtrip() { use std::io::Cursor; + // EAX and OCB can be used with all symmetric algorithms using + // a 16-byte block size. for sym_algo in [SymmetricAlgorithm::AES128, SymmetricAlgorithm::AES192, SymmetricAlgorithm::AES256, @@ -813,7 +815,10 @@ mod tests { SymmetricAlgorithm::Camellia256] .iter() .filter(|algo| algo.is_supported()) { - for aead in [AEADAlgorithm::EAX].iter() { + for aead in [ + AEADAlgorithm::EAX, + AEADAlgorithm::OCB, + ].iter().filter(|algo| algo.is_supported()) { let version = 1; let chunk_size = 64; let mut key = vec![0; sym_algo.key_size().unwrap()]; |