SimpleCrypto.Net a PBKDF2 Hashing wrapper for .Net Framework

Recently, Jeff Atwood blogged about a hashing speed problem, so I decided to rewrite my library since many people will be searching for easier ways of implementing PBKDF2 hashing. So I moved and re-factored my PBKDF2 algorithm stated in this post into this project which is much more object oriented friendly and focused only as a cryptography library. SimpleCrypto.Net, a simple wrapper for .NET that abstracts away complex cryptography algorithms from the user (easy password hashing for noobs).

There are 3 basic ways of using this wrapper:

1. Compute Hash for a string by generating a salt

Default Hash Iteration: 5000

Default Salt Size: 16  

2. Compute Hash for a string by generating a salt with parameters

 

3. Compute Hash for a string with known salt

 

Salt Generation

The salt is stored in the format of: “{#hash_iterations}.{generated_salt}”. Salt size is used as the number of bits the generated_salt should be. An example would be: “50.dakh3oihh123knadn”. If the salt is not in this format, a FormatException will be thrown. Remember to always generate an unique salt for each user and regenerate it whenever they change password.

The library is also hosted on NuGet:  PM> Install-Package SimpleCrypto

I may be adding more hashing algorithms in the future, or if you would like to add some, fork the project and do a pull request. Please include unit test.