diff --git a/aead/src/lib.rs b/aead/src/lib.rs index b6ccdd7d0..cd358a88d 100644 --- a/aead/src/lib.rs +++ b/aead/src/lib.rs @@ -25,15 +25,17 @@ extern crate alloc; #[cfg(feature = "std")] extern crate std; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; + #[cfg(feature = "heapless")] pub use heapless; -#[cfg(feature = "alloc")] -use alloc::vec::Vec; use core::fmt; use generic_array::{typenum::Unsigned, ArrayLength, GenericArray}; +#[cfg(feature = "alloc")] +use alloc::vec::Vec; + /// Error type #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct Error; diff --git a/block-cipher-trait/src/lib.rs b/block-cipher-trait/src/lib.rs index 6b85de4fb..11e2a555a 100644 --- a/block-cipher-trait/src/lib.rs +++ b/block-cipher-trait/src/lib.rs @@ -15,7 +15,7 @@ pub mod dev; mod errors; pub use crate::errors::InvalidKeyLength; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; use generic_array::typenum::Unsigned; use generic_array::{ArrayLength, GenericArray}; diff --git a/crypto-mac/src/lib.rs b/crypto-mac/src/lib.rs index a0477d69f..4c04c3ad4 100644 --- a/crypto-mac/src/lib.rs +++ b/crypto-mac/src/lib.rs @@ -14,7 +14,7 @@ pub mod dev; mod errors; pub use crate::errors::{InvalidKeyLength, MacError}; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; use generic_array::typenum::Unsigned; use generic_array::{ArrayLength, GenericArray}; diff --git a/digest/src/lib.rs b/digest/src/lib.rs index 64e0e83a9..ceb5186ec 100644 --- a/digest/src/lib.rs +++ b/digest/src/lib.rs @@ -33,7 +33,7 @@ mod errors; pub use crate::digest::{Digest, Output}; pub use crate::errors::InvalidOutputSize; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; #[cfg(feature = "std")] #[cfg_attr(docsrs, doc(cfg(feature = "std")))] diff --git a/stream-cipher/src/lib.rs b/stream-cipher/src/lib.rs index cf5b7d79c..8a2366905 100644 --- a/stream-cipher/src/lib.rs +++ b/stream-cipher/src/lib.rs @@ -18,7 +18,7 @@ pub mod dev; mod errors; pub use crate::errors::{InvalidKeyNonceLength, LoopError}; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; use generic_array::typenum::Unsigned; use generic_array::{ArrayLength, GenericArray}; diff --git a/universal-hash/src/lib.rs b/universal-hash/src/lib.rs index 264bdd9ab..2e6490e72 100644 --- a/universal-hash/src/lib.rs +++ b/universal-hash/src/lib.rs @@ -21,7 +21,7 @@ #[cfg(feature = "std")] extern crate std; -pub use generic_array; +pub use generic_array::{self, typenum::consts}; use generic_array::typenum::Unsigned; use generic_array::{ArrayLength, GenericArray}; @@ -32,6 +32,7 @@ use subtle::{Choice, ConstantTimeEq}; pub trait UniversalHash: Clone { /// Size of the key for the universal hash function type KeySize: ArrayLength; + /// Size of the inputs to and outputs from the universal hash function type BlockSize: ArrayLength;