Skip to content

Commit bcedd16

Browse files
authored
Migrate to new dev macro (#502)
1 parent 2c68c5b commit bcedd16

File tree

9 files changed

+33
-28
lines changed

9 files changed

+33
-28
lines changed

Cargo.lock

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ members = [
2525

2626
[profile.dev]
2727
opt-level = 2
28+
29+
[patch.crates-io]
30+
# https://github.com/RustCrypto/traits/pull/1998
31+
cipher = { git = "https://github.com/RustCrypto/traits" }
32+
# https://github.com/RustCrypto/utils/pull/1187
33+
blobby = { git = "https://github.com/RustCrypto/utils" }

aes/tests/mod.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
//! Test vectors are from NESSIE:
22
//! https://www.cosic.esat.kuleuven.be/nessie/testvectors/
33
4-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
5-
//cipher::block_cipher_test!(aes128_test, "aes128", aes::Aes128);
6-
//cipher::block_cipher_test!(aes192_test, "aes192", aes::Aes192);
7-
//cipher::block_cipher_test!(aes256_test, "aes256", aes::Aes256);
4+
cipher::block_cipher_test!(aes128, aes::Aes128);
5+
cipher::block_cipher_test!(aes192, aes::Aes192);
6+
cipher::block_cipher_test!(aes256, aes::Aes256);
7+
8+
cipher::block_cipher_test!(aes128_enc, "aes128", aes::Aes128Enc, encrypt_test);
9+
cipher::block_cipher_test!(aes192_enc, "aes192", aes::Aes192Enc, encrypt_test);
10+
cipher::block_cipher_test!(aes256_enc, "aes256", aes::Aes256Enc, encrypt_test);
11+
12+
cipher::block_cipher_test!(aes128_dec, "aes128", aes::Aes128Dec, decrypt_test);
13+
cipher::block_cipher_test!(aes192_dec, "aes192", aes::Aes192Dec, decrypt_test);
14+
cipher::block_cipher_test!(aes256_dec, "aes256", aes::Aes256Dec, decrypt_test);

blowfish/tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
2-
//cipher::block_cipher_test!(blowfish_test, "blowfish", blowfish::Blowfish);
2+
cipher::block_cipher_test!(blowfish, blowfish::Blowfish);
33
// Tests for BlowfishLE were randomly generated using implementation in this crate
4-
//cipher::block_cipher_test!(blowfish_le_test, "blowfish_le", blowfish::BlowfishLE);
4+
cipher::block_cipher_test!(blowfish_le, blowfish::BlowfishLE);

camellia/tests/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Test vectors are from NESSIE:
22
//! <https://www.cosic.esat.kuleuven.be/nessie/testvectors/>
33
4-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
5-
//cipher::block_cipher_test!(camellia128_test, "camellia128", camellia::Camellia128);
6-
//cipher::block_cipher_test!(camellia192_test, "camellia192", camellia::Camellia192);
7-
//cipher::block_cipher_test!(camellia256_test, "camellia256", camellia::Camellia256);
4+
cipher::block_cipher_test!(camellia128, camellia::Camellia128);
5+
cipher::block_cipher_test!(camellia192, camellia::Camellia192);
6+
cipher::block_cipher_test!(camellia256, camellia::Camellia256);

cast5/tests/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,4 @@ fn full_maintenance_test() {
8080

8181
// Test vectors from NESSIE:
8282
// https://www.cosic.esat.kuleuven.be/nessie/testvectors/bc/cast-128/Cast-128-128-64.verified.test-vectors
83-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
84-
//cipher::block_cipher_test!(cast5_nessie, "cast5", cast5::Cast5);
83+
cipher::block_cipher_test!(cast5, cast5::Cast5);

des/tests/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Test vectors are from NESSIE:
22
//! https://www.cosic.esat.kuleuven.be/nessie/testvectors/
33
4-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
5-
//cipher::block_cipher_test!(des_test, "des", des::Des);
6-
//cipher::block_cipher_test!(tdes_ede3_test, "tdes", des::TdesEde3);
7-
//cipher::block_cipher_test!(tdes_ede2_test, "tdes2", des::TdesEde2);
4+
cipher::block_cipher_test!(des, des::Des);
5+
cipher::block_cipher_test!(tdes, des::TdesEde3);
6+
cipher::block_cipher_test!(tdes2, des::TdesEde2);

idea/tests/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Test vectors from:
22
//! https://www.cosic.esat.kuleuven.be/nessie/testvectors/bc/idea/Idea-128-64.verified.test-vectors
33
4-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
5-
//cipher::block_cipher_test!(idea_test, "idea", idea::Idea);
4+
cipher::block_cipher_test!(idea, idea::Idea);

serpent/tests/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Test vectors from Nessie:
22
//! http://www.cs.technion.ac.il/~biham/Reports/Serpent/Serpent-128-128.verified.test-vectors
33
4-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
5-
//cipher::block_cipher_test!(serpent128_test, "serpent128", serpent::Serpent);
6-
//cipher::block_cipher_test!(serpent192_test, "serpent192", serpent::Serpent);
7-
//cipher::block_cipher_test!(serpent256_test, "serpent256", serpent::Serpent);
4+
cipher::block_cipher_test!(serpent128, serpent::Serpent);
5+
cipher::block_cipher_test!(serpent192, serpent::Serpent);
6+
cipher::block_cipher_test!(serpent256, serpent::Serpent);

0 commit comments

Comments
 (0)