Crates.io | blake2s_simd |
lib.rs | blake2s_simd |
version | |
source | src |
created_at | 2019-05-21 21:39:31.415925 |
updated_at | 2025-02-04 19:25:45.879837 |
description | a pure Rust BLAKE2s implementation with dynamic SIMD |
homepage | |
repository | https://github.com/oconnor663/blake2_simd |
max_upload_size | |
id | 135946 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
An implementation of the BLAKE2s and BLAKE2sp hash functions. See also
blake2b_simd
.
This crate includes:
blake2-avx2
.
These are very fast. For benchmarks, see the Performance section of the
README.no_std
support. The std
Cargo feature is on by default, for CPU feature detection and
for implementing std::io::Write
.many
module.use blake2s_simd::{blake2s, Params};
let expected = "08d6cad88075de8f192db097573d0e829411cd91eb6ec65e8fc16c017edfdb74";
let hash = blake2s(b"foo");
assert_eq!(expected, &hash.to_hex());
let hash = Params::new()
.hash_length(16)
.key(b"Squeamish Ossifrage")
.personal(b"Shaftoe")
.to_state()
.update(b"foo")
.update(b"bar")
.update(b"baz")
.finalize();
assert_eq!("28325512782cbf5019424fa65da9a6c7", &hash.to_hex());