# const-hex
[](https://github.com/danipopes/const-hex)
[](https://crates.io/crates/const-hex)
[](https://docs.rs/const-hex)
[](https://github.com/danipopes/const-hex/actions?query=branch%3Amaster)
This crate provides a fast conversion of byte arrays to hexadecimal strings,
both at compile time, and at run time.
Extends the [`hex`] crate's implementation with [const-eval], a
[const-generics formatting buffer][buffer], similar to [`itoa`]'s, and more.
_Version requirement: rustc 1.64+_
[const-eval]: https://docs.rs/const-hex/latest/const-hex/fn.const_encode.html
[buffer]: https://docs.rs/const-hex/latest/const-hex/struct.Buffer.html
[`itoa`]: https://docs.rs/itoa/latest/itoa/struct.Buffer.html
## Acknowledgements
- [`hex`] for most of the formatting implementation
- [dtolnay]/[itoa] for the initial crate/library API layout
[`hex`]: https://crates.io/crates/hex
[dtolnay]: https://github.com/dtolnay
[itoa]: https://github.com/dtolnay/itoa
## License
Licensed under either of [Apache License, Version 2.0](./LICENSE-APACHE) or
[MIT license](./LICENSE-MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.