generateBase64Key method

String generateBase64Key(
  1. String password,
  2. String salt,
  3. int rounds,
  4. int keyLength,
)

Hashed a password with a given salt and base64 encodes the result.

This method invokes generateKey and base64 encodes the result.

Implementation

String generateBase64Key(
  String password,
  String salt,
  int rounds,
  int keyLength,
) {
  const converter = Base64Encoder();

  return converter.convert(generateKey(password, salt, rounds, keyLength));
}