Skip to content

Commit

Permalink
Merge pull request RustCrypto#123 from RustCrypto/reexport-typenum-co…
Browse files Browse the repository at this point in the history
…nsts

Re-export `typenum::consts` as `consts`
  • Loading branch information
tarcieri committed May 23, 2020
2 parents a3c342d + 371db89 commit ac59f82
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
8 changes: 5 additions & 3 deletions aead/src/lib.rs
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion block-cipher-trait/src/lib.rs
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion crypto-mac/src/lib.rs
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion digest/src/lib.rs
Expand Up @@ -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")))]
Expand Down
2 changes: 1 addition & 1 deletion stream-cipher/src/lib.rs
Expand Up @@ -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};
Expand Down
3 changes: 2 additions & 1 deletion universal-hash/src/lib.rs
Expand Up @@ -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};
Expand All @@ -32,6 +32,7 @@ use subtle::{Choice, ConstantTimeEq};
pub trait UniversalHash: Clone {
/// Size of the key for the universal hash function
type KeySize: ArrayLength<u8>;

/// Size of the inputs to and outputs from the universal hash function
type BlockSize: ArrayLength<u8>;

Expand Down

0 comments on commit ac59f82

Please sign in to comment.