A utility method to generate a password hash using the PBKDF2 scheme.
Source
static String generatePasswordHash(String password, String salt,
{int hashRounds: 1000, int hashLength: 32}) {
var generator = new PBKDF2(hashAlgorithm: sha256);
return generator.generateBase64Key(password, salt, hashRounds, hashLength);
}