pwhash

Build Status

A collection of password hashing and verification routines.

See the documentation for API reference.

Getting Started

Add the following to the [dependencies] section of your Cargo.toml:

toml pwhash = "0.1"

Also, import the crate in your crate root:

rust extern crate pwhash;

Example

```rust extern crate pwhash;

use pwhash::bcrypt;

// Hash a password with default parameters. let h_new = bcrypt::hash("password").unwrap();

// Verify a password against an existing hash. let h = "$2y$05$bvIG6Nmid91Mu9RcmmWZfO\ 5HJIMCT8riNW0hEp8f6/FuA2/mHZFpe"; assert!(bcrypt::verify("password", h)); ```

Summary

The following algorithms are currently implemented (in alphabetical order):

Each algorithm resides in its eponymous module, and provides the following interface:

There is also a convenience module unix which provides the functions unix::crypt, a crypt(3) work-alike, and unix::verify.