diff options
| author | Jack O'Connor <[email protected]> | 2021-02-28 15:16:25 -0500 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2021-02-28 15:28:39 -0500 |
| commit | ece17deb7420c6db177f00a3a4a191cc4133443f (patch) | |
| tree | a4c82534e43aaf116796e23abd4b9edb46e2da04 /src/test.rs | |
| parent | 0359065018e2bafa31d319010ec5cebc35ad4393 (diff) | |
EXPERIMENTAL: change derive_key() to use const genericsderive_key_array
Diffstat (limited to 'src/test.rs')
| -rw-r--r-- | src/test.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test.rs b/src/test.rs index cd46091..c0f327f 100644 --- a/src/test.rs +++ b/src/test.rs @@ -326,9 +326,8 @@ fn test_compare_reference_impl() { reference_hasher.finalize(&mut expected_out); // all at once - let mut test_out = [0; OUT]; - crate::derive_key(context, input, &mut test_out); - assert_eq!(test_out[..], expected_out[..]); + let test_out = crate::derive_key(context, input); + assert_eq!(test_out, expected_out); // incremental let mut hasher = crate::Hasher::new_derive_key(context); hasher.update(input); @@ -501,8 +500,7 @@ fn test_reset() { kdf.update(&[42; 3 * CHUNK_LEN + 7]); kdf.reset(); kdf.update(&[42; CHUNK_LEN + 3]); - let mut expected = [0; crate::OUT_LEN]; - crate::derive_key(context, &[42; CHUNK_LEN + 3], &mut expected); + let expected = crate::derive_key(context, &[42; CHUNK_LEN + 3]); assert_eq!(kdf.finalize(), expected); } |
