Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Job79/SimpleHashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleHashing


Library that makes hashing with PBKDF2 simple and easy.

string hash = PBKDF2.Hash("12345");
byte[] hash2 = PBKDF2.Hash(Encoding.UTF8.GetBytes("12345"));

bool PBKDF2.Verify(hash,"12345");//true
bool PBKDF2.Verify(hash,Encoding.UTF8.GetBytes("421"));//false

Security

SimpleHashing is a library made on top of System.Security.Cryptography.Rfc2898DeriveBytes and uses a secure random 16 byte salt. PBKDF2 isn't the best algorithm for password hashing(but the best one avaible in the c# System.Securety namespace), but is still a good hashing algorithm. (With many iterations) Take a look at scrypt or argon2 for password hashing.