jahway603
1 year ago
124 changed files with 40 additions and 466 deletions
@ -0,0 +1 @@ |
|||
{"files":{"Cargo.toml":"fe7769b26a732dd9348115d6a9661607753875909888ba16292ec69e18266033","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"f7e8ab639afef15573680c97f796166835cbeb3865175882fea41c60d106b733","src/lib.rs":"0108e29e65ed2509add80706fd69e61d32e1dfe4bb0d9c83928c1db995354ce3"},"package":null} |
@ -1,24 +0,0 @@ |
|||
[package] |
|||
name = "aes" |
|||
version = "0.2.0" |
|||
authors = ["RustCrypto Developers"] |
|||
license = "MIT OR Apache-2.0" |
|||
description = "Facade for AES (Rijndael) block ciphers implementations" |
|||
documentation = "https://docs.rs/aes" |
|||
repository = "https://github.com/RustCrypto/block-ciphers" |
|||
keywords = ["crypto", "aes", "rijndael", "block-cipher"] |
|||
categories = ["cryptography", "no-std"] |
|||
|
|||
[dependencies] |
|||
block-cipher-trait = "0.5" |
|||
|
|||
[target.'cfg(not(all(target_feature="aes", target_feature = "sse2", any(target_arch = "x86_64", target_arch = "x86"))))'.dependencies] |
|||
aes-soft = "0.2" |
|||
|
|||
[target.'cfg(all(target_feature="aes", target_feature = "sse2", any(target_arch = "x86_64", target_arch = "x86")))'.dependencies] |
|||
aesni = { version = "0.4", default-features = false } |
|||
|
|||
[dev-dependencies] |
|||
block-cipher-trait = { version = "0.5", features = ["dev"] } |
|||
|
|||
[workspace] |
@ -1,68 +0,0 @@ |
|||
#![no_std] |
|||
#![feature(test)] |
|||
extern crate aes; |
|||
extern crate test; |
|||
|
|||
use aes::{Aes128, BlockCipher}; |
|||
|
|||
#[bench] |
|||
pub fn aes128_encrypt(bh: &mut test::Bencher) { |
|||
let cipher = Aes128::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.encrypt_block(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes128_decrypt(bh: &mut test::Bencher) { |
|||
let cipher = Aes128::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.decrypt_block(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes128_encrypt8(bh: &mut test::Bencher) { |
|||
let cipher = Aes128::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.encrypt_blocks(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = (input[0].len() * input.len()) as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes128_decrypt8(bh: &mut test::Bencher) { |
|||
let cipher = Aes128::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.decrypt_blocks(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = (input[0].len() * input.len()) as u64; |
|||
} |
|||
/* |
|||
#[bench] |
|||
pub fn ctr_aes128(bh: &mut test::Bencher) { |
|||
let mut cipher = aes::CtrAes128::new(&[0; 16], &[0; 16]); |
|||
let mut input = [0u8; 10000]; |
|||
|
|||
|
|||
bh.iter(|| { |
|||
cipher.xor(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
*/ |
@ -1,69 +0,0 @@ |
|||
#![no_std] |
|||
#![feature(test)] |
|||
extern crate aes; |
|||
extern crate test; |
|||
|
|||
use aes::{Aes192, BlockCipher}; |
|||
|
|||
#[bench] |
|||
pub fn aes192_encrypt(bh: &mut test::Bencher) { |
|||
let cipher = Aes192::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.encrypt_block(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes192_decrypt(bh: &mut test::Bencher) { |
|||
let cipher = Aes192::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.decrypt_block(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes192_encrypt8(bh: &mut test::Bencher) { |
|||
let cipher = Aes192::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.encrypt_blocks(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = (input[0].len() * input.len()) as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes192_decrypt8(bh: &mut test::Bencher) { |
|||
let cipher = Aes192::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.decrypt_blocks(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = (input[0].len() * input.len()) as u64; |
|||
} |
|||
|
|||
/* |
|||
#[bench] |
|||
pub fn ctr_aes192(bh: &mut test::Bencher) { |
|||
let mut cipher = aes::CtrAes192::new(&[0; 24], &[0; 16]); |
|||
let mut input = [0u8; 10000]; |
|||
|
|||
|
|||
bh.iter(|| { |
|||
cipher.xor(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
*/ |
@ -1,68 +0,0 @@ |
|||
#![no_std] |
|||
#![feature(test)] |
|||
extern crate aes; |
|||
extern crate test; |
|||
|
|||
use aes::{Aes256, BlockCipher}; |
|||
|
|||
#[bench] |
|||
pub fn aes256_encrypt(bh: &mut test::Bencher) { |
|||
let cipher = Aes256::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.encrypt_block(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes256_decrypt(bh: &mut test::Bencher) { |
|||
let cipher = Aes256::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.decrypt_block(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes256_encrypt8(bh: &mut test::Bencher) { |
|||
let cipher = Aes256::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.encrypt_blocks(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = (input[0].len() * input.len()) as u64; |
|||
} |
|||
|
|||
#[bench] |
|||
pub fn aes256_decrypt8(bh: &mut test::Bencher) { |
|||
let cipher = Aes256::new(&Default::default()); |
|||
let mut input = Default::default(); |
|||
|
|||
bh.iter(|| { |
|||
cipher.decrypt_blocks(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = (input[0].len() * input.len()) as u64; |
|||
} |
|||
/* |
|||
#[bench] |
|||
pub fn ctr_aes256(bh: &mut test::Bencher) { |
|||
let mut cipher = aes::CtrAes256::new(&[0; 32], &[0; 16]); |
|||
let mut input = [0u8; 10000]; |
|||
|
|||
|
|||
bh.iter(|| { |
|||
cipher.xor(&mut input); |
|||
test::black_box(&input); |
|||
}); |
|||
bh.bytes = input.len() as u64; |
|||
} |
|||
*/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +0,0 @@ |
|||
//! Test vectors are from NESSIE:
|
|||
//! https://www.cosic.esat.kuleuven.be/nessie/testvectors/
|
|||
#![no_std] |
|||
extern crate aes; |
|||
#[macro_use] |
|||
extern crate block_cipher_trait; |
|||
|
|||
new_test!(aes128_test, "aes128", aes::Aes128); |
|||
new_test!(aes192_test, "aes192", aes::Aes192); |
|||
new_test!(aes256_test, "aes256", aes::Aes256); |
@ -0,0 +1 @@ |
|||
{"files":{"Cargo.toml":"e0cc5f966c73e14099d0820fa908887c6d492fbd680841a6e81bdec9f053d44d","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"9e0dfd2dd4173a530e238cb6adb37aa78c34c6bc7444e0e10c1ab5d8881f63ba","src/lib.rs":"878ddfc0a081ae1172dfba753beb89476bdbbf423fcc38ae692a02736aed8d07"},"package":null} |
@ -1 +0,0 @@ |
|||
ok |
@ -1,13 +0,0 @@ |
|||
[package] |
|||
name = "crypto-mac" |
|||
version = "0.4.0" |
|||
authors = ["The RustCrypto Devs"] |
|||
license = "MIT/Apache-2.0" |
|||
description = "Trait for Message Authentication Code (MAC) algorithms" |
|||
documentation = "https://docs.rs/crypto-mac" |
|||
repository = "https://github.com/RustCrypto/traits" |
|||
keywords = ["crypto", "mac"] |
|||
|
|||
[dependencies] |
|||
generic-array = "0.8" |
|||
constant_time_eq = "0.1" |
@ -0,0 +1 @@ |
|||
{"files":{"Cargo.toml":"399d1c36cbd87de4b1fc24ad81f21fe43aef826b1e723e6c02c44a0ebe77c269","LICENSE-APACHE":"a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5","LICENSE-MIT":"9e0dfd2dd4173a530e238cb6adb37aa78c34c6bc7444e0e10c1ab5d8881f63ba","src/lib.rs":"f17520ab746a7a9113219622aba60e0b5fa9601752e1fa06a71cbfdf905322fc"},"package":null} |
@ -1 +0,0 @@ |
|||
ok |
@ -1,19 +0,0 @@ |
|||
[package] |
|||
name = "hmac" |
|||
version = "0.4.2" |
|||
authors = ["RustCrypto Developers"] |
|||
license = "MIT/Apache-2.0" |
|||
description = "Generic implementation of Hash-based Message Authentication Code (HMAC)" |
|||
documentation = "https://docs.rs/hmac" |
|||
repository = "https://github.com/RustCrypto/MACs" |
|||
keywords = ["crypto", "mac", "hmac", "digest"] |
|||
|
|||
[dependencies] |
|||
crypto-mac = "0.4" |
|||
generic-array = "0.8" |
|||
digest = "0.6" |
|||
|
|||
[dev-dependencies] |
|||
crypto-tests = "0.5" |
|||
md-5 = "0.5" |
|||
sha2 = "0.6" |
@ -1 +0,0 @@ |
|||
Hi There |
@ -1 +0,0 @@ |
|||
|
@ -1 +0,0 @@ |
|||
��rz68������� |
@ -1 +0,0 @@ |
|||
what do ya want for nothing? |
@ -1 +0,0 @@ |
|||
Jefe |
@ -1,2 +0,0 @@ |
|||
ux>jーオ�n1 |
|||
]キ8 |
@ -1 +0,0 @@ |
|||
ンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンン |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
V¾4RLˆÛ¸Ç3ðè³ö |
@ -1 +0,0 @@ |
|||
The quick brown fox jumps over the lazy dog |
@ -1 +0,0 @@ |
|||
key |
@ -1 +0,0 @@ |
|||
€F>wIą-ÂIâu |
@ -1 +0,0 @@ |
|||
Hi There |
@ -1 +0,0 @@ |
|||
|
@ -1 +0,0 @@ |
|||
‰o±Š»ßh2|Ô�ó?G´±™ºOShK" |
@ -1 +0,0 @@ |
|||
what do ya want for nothing? |
@ -1 +0,0 @@ |
|||
Jefe |
Binary file not shown.
@ -1 +0,0 @@ |
|||
ンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンン |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
³Ë5ˆÆÁöÿ©iM}jÒd“e°Áö]iÑìƒ3ê |
@ -1 +0,0 @@ |
|||
ヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘ |
@ -1,2 +0,0 @@ |
|||
|
|||
|
@ -1 +0,0 @@ |
|||
lPht<¬j*¼³‚b|ìj�Ønü-ç¯ìZ |
@ -1 +0,0 @@ |
|||
Test With Truncation |
@ -1 +0,0 @@ |
|||
|
@ -1 +0,0 @@ |
|||
*Йh╘█7и┬╪ш÷йo╗ °ьWгЛJйеL |
@ -1 +0,0 @@ |
|||
Test Using Larger Than Block-Size Key - Hash Key First |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
•é Û– •®¾›-o
¼âÔ™ñòÒ·'?¦‡ |
@ -1 +0,0 @@ |
|||
This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm. |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
:…Af¬]Ÿ?TÕг�½”gpÛœ+•ÉöõeÑ |
@ -1 +0,0 @@ |
|||
Hi There |
@ -1 +0,0 @@ |
|||
|
Binary file not shown.
@ -1 +0,0 @@ |
|||
what do ya want for nothing? |
@ -1 +0,0 @@ |
|||
Jefe |
Binary file not shown.
@ -1 +0,0 @@ |
|||
ンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンン |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
w>©6€F…M¸ëБ�§)Y ‹>øÁ"ÙcUÎÕeþ |
@ -1 +0,0 @@ |
|||
ヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘ |
@ -1,2 +0,0 @@ |
|||
|
|||
|
@ -1 +0,0 @@ |
|||
‚UŠ8šD<¤Ě��™ň:…đúŁĺxřz.?ôg)f[ |
@ -1 +0,0 @@ |
|||
Test With Truncation |
@ -1 +0,0 @@ |
|||
|
@ -1,2 +0,0 @@ |
|||
£¶tsΰnyl)UU+ϊo| |
|||
j�ο‹“ψ`�°Ν Ε |
@ -1 +0,0 @@ |
|||
Test Using Larger Than Block-Size Key - Hash Key First |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
`ä1Yà¶
Š&ªËõ·ŽÆ!7(ÅFãT |
@ -1 +0,0 @@ |
|||
This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm. |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
› ˙§”/Ë'c_ĽŐ°éDżÜcdO“ŠQS\:5â |
@ -1 +0,0 @@ |
|||
Hi There |
@ -1 +0,0 @@ |
|||
|
@ -1 +0,0 @@ |
|||
¯׀9D״H•bk%פ«F�ש��הֶ‚×L|כֵ�תך�©n�JסRט²ת�¶ |
@ -1 +0,0 @@ |
|||
what do ya want for nothing? |
@ -1 +0,0 @@ |
|||
Jefe |
@ -1 +0,0 @@ |
|||
¯EÒãvH@1axÒµŠkœ~ôdõ Gä.Ãsc"D^Ž"@Ê^iâÇ‹29ìú²I |
@ -1 +0,0 @@ |
|||
ンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンン |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェ |
@ -1,3 +0,0 @@ |
|||
ˆ&ÓæŠ |
|||
¢¬àȨo |
|||
¦5ÙG¬Ÿëè>ôåYfK*Z³�Á8¹N:¶á£O' |
@ -1 +0,0 @@ |
|||
ヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘ |
@ -1,2 +0,0 @@ |
|||
|
|||
|
Binary file not shown.
@ -1 +0,0 @@ |
|||
Test With Truncation |
@ -1 +0,0 @@ |
|||
|
@ -1 +0,0 @@ |
|||
:¿4ÃP;*#¤nüa›®ø—ôÈä,“Lå\Ë®—@ü¼ôÊb&ž*7͈º’cAïä®ê |
@ -1 +0,0 @@ |
|||
Test Using Larger Than Block-Size Key - Hash Key First |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
NÎD…�>�ˆÒÆ:Å´Ožñ*+X�<Ñ:ÄÆ.ö«@0þ‚–$�ñcôIR |
@ -1 +0,0 @@ |
|||
This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm. |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
fŽ”
5/%N�Ó,`$ þ°¸ûšÜλ‚F™Å¦xÌ1ç™m8`æFR> |
@ -1 +0,0 @@ |
|||
Hi There |
@ -1 +0,0 @@ |
|||
|
@ -1 +0,0 @@ |
|||
‡ª|Þ¥ïa�Oð´$l°#yôâÎNÂxzгEá|ÞÚ¨3·Ö¸§‹'N®£ôä¾�‘Nëañp.il :hT |
@ -1 +0,0 @@ |
|||
what do ya want for nothing? |
@ -1 +0,0 @@ |
|||
Jefe |
@ -1,2 +0,0 @@ |
|||
Kz{�������;Vࣇ�d".��'��%T�X�u�Z�JmOe�����걣MJkKcn |
|||
8��7 |
@ -1 +0,0 @@ |
|||
ンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンンン |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
Зs╟²V╒└О╟Пul┴И╠╣шщ▌Х6UЬ>3╡'²9©>└┌y╖"х╢┘╓~gх╧Fё7╬Х■&t'┬YА2▓Ш |
@ -1 +0,0 @@ |
|||
ヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘ |
@ -1,2 +0,0 @@ |
|||
|
|||
|
@ -1 +0,0 @@ |
|||
°ºFV7EŒi�å¨ÅöJ÷åvÙùK‡-ço€P6ãÛ©¥Á¢^´Öy'\Åx€c¥ñ—AO-âëë¢˜Ý |
@ -1 +0,0 @@ |
|||
Test With Truncation |
@ -1 +0,0 @@ |
|||
|
@ -1,2 +0,0 @@ |
|||
A_bqX |
|||
SAy¼‰‡¦P‡’*O»6f:±m q[PÝÐü#P„ë�3d¡EO²ïgÍ)þgsŽ¢fék |
@ -1 +0,0 @@ |
|||
Test Using Larger Than Block-Size Key - Hash Key First |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1,2 +0,0 @@ |
|||
��Bcاء�ً��ء�{و��Fر�Jَء7���RkVذ7ـ_%��ز!]jR�نOs�? |
|||
ٌ��Z�]xe� |
@ -1 +0,0 @@ |
|||
This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm. |
@ -1 +0,0 @@ |
|||
ェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェェ |
@ -1 +0,0 @@ |
|||
縵jw]ネ}コ、゚ゥ�^?�゙スq�r掩]�- ヘノDカ,ャ<Iこ
^�テ葯Fv璟潺`eノt@卲jX |
@ -1,57 +0,0 @@ |
|||
#![no_std] |
|||
#[macro_use] |
|||
extern crate crypto_tests; |
|||
extern crate hmac; |
|||
extern crate md_5 as md5; |
|||
extern crate sha2; |
|||
|
|||
use crypto_tests::mac::{mac_test, MacTest}; |
|||
use hmac::Hmac; |
|||
|
|||
#[test] |
|||
fn hmac_md5() { |
|||
// Test vectors from RFC 2104, plus wiki test
|
|||
let tests = new_mac_tests!("md5/1", "md5/2", "md5/3", "md5/4"); |
|||
mac_test::<Hmac<md5::Md5>>(&tests); |
|||
} |
|||
|
|||
|
|||
#[test] |
|||
fn hmac_sha224() { |
|||
// Test vectors from RFC 4231
|
|||
let tests = new_mac_tests!( |
|||
"sha224/1", "sha224/2", "sha224/3", "sha224/4", |
|||
"sha224/5", "sha224/6", "sha224/7" |
|||
); |
|||
mac_test::<Hmac<sha2::Sha224>>(&tests); |
|||
} |
|||
|
|||
#[test] |
|||
fn hmac_sha256() { |
|||
// Test vectors from RFC 4231
|
|||
let tests = new_mac_tests!( |
|||
"sha256/1", "sha256/2", "sha256/3", "sha256/4", |
|||
"sha256/5", "sha256/6", "sha256/7" |
|||
); |
|||
mac_test::<Hmac<sha2::Sha256>>(&tests); |
|||
} |
|||
|
|||
#[test] |
|||
fn hmac_sha384() { |
|||
// Test vectors from RFC 4231
|
|||
let tests = new_mac_tests!( |
|||
"sha384/1", "sha384/2", "sha384/3", "sha384/4", |
|||
"sha384/5", "sha384/6", "sha384/7" |
|||
); |
|||
mac_test::<Hmac<sha2::Sha384>>(&tests); |
|||
} |
|||
|
|||
#[test] |
|||
fn hmac_sha512() { |
|||
// Test vectors from RFC 4231
|
|||
let tests = new_mac_tests!( |
|||
"sha512/1", "sha512/2", "sha512/3", "sha512/4", |
|||
"sha512/5", "sha512/6", "sha512/7" |
|||
); |
|||
mac_test::<Hmac<sha2::Sha512>>(&tests); |
|||
} |
Loading…
Reference in new issue