public string ComputeHmacFromString(string toBeHashed, string key) { return(Convert.ToBase64String(Hashing.ComputeHmacSha256(Encoding.UTF8.GetBytes(toBeHashed), Encoding.UTF8.GetBytes(key)))); }
public static string HashPasswordString(string password, string salt) { return(Convert.ToBase64String(Hashing.HashPasswordWithSalt( Encoding.UTF8.GetBytes(password), Encoding.UTF8.GetBytes(salt)))); }