Description

PBKDF2 implementation for D

Package Information

Version0.1.2 (2017-Mar-13)
Repository https://github.com/tchaloupka/pbkdf2
LicenseBSL-1.0
CopyrightCopyright © 2016, Tomáš Chaloupka
AuthorsTomáš Chaloupka
Registered byTomáš Chaloupka
Dependencies none

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

PBKDF2 for D

D-language implementation of Password Based Key Derivation Function 2 RFC2898.

Unlike bcrypt this is easy to understand, secure enough given a sufficently random salt and implemented on top of the standard Phobos library.

It uses HMAC as a pseudorandom function, with SHA1 as a default hashing function.

Sample usage:

import std.string : representation;
import std.digest.sha;
import kdf.pbkdf2;

auto dk = pbkdf2("password".representation, "salt".representation);
auto dk256 = pbkdf2!SHA256("password".representation, "salt".representation);

Test vectors for HMAC-SHA1 and HMAC-SHA256 are included.

Available versions

0.1.2 0.1.1 0.1.0 ~master