|
28 | 28 |
|
29 | 29 | pub use crypto_mac;
|
30 | 30 |
|
| 31 | +use blake2::{ |
| 32 | + digest::{ |
| 33 | + block_buffer::{DigestBuffer, LazyBlockBuffer}, |
| 34 | + core_api::VariableOutputCore, |
| 35 | + }, |
| 36 | + Blake2bVarCore, Blake2sVarCore, |
| 37 | +}; |
31 | 38 | use core::{fmt, marker::PhantomData};
|
32 | 39 | use crypto_mac::{
|
33 |
| - consts::{U64, U32}, |
| 40 | + consts::{U32, U64}, |
34 | 41 | crypto_common::{
|
35 |
| - FixedOutput, KeySizeUser, Output, OutputSizeUser, Update, |
36 |
| - BlockSizeUser, UpdateCore, |
| 42 | + BlockSizeUser, FixedOutput, KeySizeUser, Output, OutputSizeUser, Update, UpdateCore, |
37 | 43 | },
|
38 |
| - InvalidLength, Key, KeyInit, Mac, |
39 | 44 | generic_array::{
|
40 | 45 | typenum::{IsLessOrEqual, LeEq, NonZero, Unsigned},
|
41 | 46 | ArrayLength,
|
42 | 47 | },
|
43 |
| -}; |
44 |
| -use blake2::{ |
45 |
| - Blake2bVarCore, Blake2sVarCore, |
46 |
| - digest::{ |
47 |
| - core_api::VariableOutputCore, |
48 |
| - block_buffer::{LazyBlockBuffer, DigestBuffer}, |
49 |
| - }, |
| 48 | + InvalidLength, Key, KeyInit, Mac, |
50 | 49 | };
|
51 | 50 |
|
52 |
| - |
53 | 51 | macro_rules! blake2_mac_impl {
|
54 | 52 | (
|
55 | 53 | $name:ident, $hash:ty, $max_size:ty, $doc:expr
|
@@ -150,7 +148,6 @@ macro_rules! blake2_mac_impl {
|
150 | 148 | };
|
151 | 149 | }
|
152 | 150 |
|
153 |
| - |
154 | 151 | blake2_mac_impl!(Blake2bMac, Blake2bVarCore, U64, "Blake2b MAC function");
|
155 | 152 | blake2_mac_impl!(Blake2sMac, Blake2sVarCore, U32, "Blake2s MAC function");
|
156 | 153 |
|
|
0 commit comments