<commit_before># rust-fastpbkdf2
This is a rust binding for [fastpbkdf2](https://github.com/ctz/fastpbkdf2).

[![Build Status](https://travis-ci.org/ctz/rust-fastpbkdf2.svg)](https://travis-ci.org/ctz/rust-fastpbkdf2)

## Interface

```rust
pub fn pbkdf2_hmac_sha1(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
pub fn pbkdf2_hmac_sha256(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
pub fn pbkdf2_hmac_sha512(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
```

## Performance

TODO

## Building and testing

You'll need OpenSSL for `fastpbkdf2`.  `cargo build` builds, `cargo test` runs tests.

## License
[CC0](https://creativecommons.org/publicdomain/zero/1.0/).

## Author
<NAME> <<EMAIL>>
<commit_msg>Add benchmark<commit_after># rust-fastpbkdf2
This is a rust binding for [fastpbkdf2](https://github.com/ctz/fastpbkdf2).

[![Build Status](https://travis-ci.org/ctz/rust-fastpbkdf2.svg)](https://travis-ci.org/ctz/rust-fastpbkdf2)

## Interface

```rust
pub fn pbkdf2_hmac_sha1(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
pub fn pbkdf2_hmac_sha256(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
pub fn pbkdf2_hmac_sha512(password: &[u8], salt: &[u8], iterations: u32, out: &mut[u8]);
```

## Performance

Hash   | fastpbkdf2   | ring            | rust-crypto
-------|--------------|-----------------|----------------
SHA1   | 380ms        | 5299ms (13.9x)  | 41015ms (108x)
SHA256 | 855ms        | 8244ms (9.6x)  | 71521ms (84x)
SHA512 | 1329ms       | 15172ms (11.4x) | 81378ms (61x)

On Intel i3-2100T CPU @ 2.50GHz, 2<sup>20</sup> iterations, 64-bit mode.

## Building and testing

You'll need OpenSSL for `fastpbkdf2`.  `cargo build` builds, `cargo test` runs tests.

## License
[CC0](https://creativecommons.org/publicdomain/zero/1.0/).

## Author
<NAME> <<EMAIL>>

{'fraction_non_alphanumeric': 0.20817643894566973, 'fraction_numerical': 0.07638515330823023, 'mean_word_length': 3.93368700265252, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3153302', 'n_tokens_mistral': 841, 'n_tokens_neox': 762, 'n_words': 161}