A general solution for commonly used crypt in rust, collection of cryptography-related traits and algorithms.
This is a Rust implementation of the original houseme/gocrypto, which is written in Go.
Add the following to your Cargo.toml
:
[dependencies]
crypto-rs = "0.1"
Run them yourself with cargo bench
.
test bench_decompose ... bench: 651 ns/iter (+/- 251)
test bench_new ... bench: 795,722 ns/iter (+/- 371,556)
test bench_next_id ... bench: 36,652 ns/iter (+/- 1,105)
test bench_decompose ... bench: 1,066 ns/iter (+/- 132)
test bench_new ... bench: 738,129 ns/iter (+/- 318,192)
test bench_next_id ... bench: 37,390 ns/iter (+/- 499)
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.