Expand description

RustCrypto: Hybrid Const Generic / Typenum Arrays

crate Docs Build Status Safety Dance Apache2/MIT licensed Rust Version Project Chat

Hybrid array type combining const generics with the expressiveness of typenum-based constraints, providing an alternative to generic-array and a incremental transition path to const generics.



This crate uses typenum to enable the following features which aren’t yet possible with the stable implementation of const generics:

Internally the crate is built on const generics and provides traits which make it possible to convert between const generic types and typenum types.


Licensed under either of:

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


pub use typenum;


Hybrid typenum-based and const generic array type.


Array operations which are const generic over a given array size.

Trait which associates a usize size and ArrayType with a typenum-provided Unsigned integer.

Convert the given type into an Array.

Type Definitions

Byte array type.