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, Hash hashFunction}) { var generator = new PBKDF2(hashAlgorithm: hashFunction ?? sha256); return generator.generateBase64Key(password, salt, hashRounds, hashLength); }