getSaltedPasswordHash static method
Hashes a password and its salt.
Implementation
static Future<String> getSaltedPasswordHash(
String salt,
String password,
) async {
var saltBytes = base64Decode(salt);
var cub = _getCodeUnitBytes(password.codeUnits);
var bytes = [...cub, ...saltBytes];
var hash = await Sha256().hash(bytes);
var encoded = base64Encode(hash.bytes);
return encoded;
}