/// <summary>
 /// get a secure name
 /// </summary>
 /// <param name="name">orginal name</param>
 /// <returns>secure name based off original</returns>
 private string GetSecureName(string name)
 {
     byte[] hash = SecureStorageUtility.HMACSHA256(name, crypto.Key);
     return(SecureStorageUtility.FromBytesToHex(hash));
 }
Exemple #2
0
 /// <summary>
 /// GetSecureHash
 /// </summary>
 /// <param name="data">data</param>
 /// <returns>string</returns>
 public string GetSecureHash(string data)
 {
     byte[] hash = SecureStorageUtility.HMACSHA256(data, Key);
     return(SecureStorageUtility.FromBytesToHex(hash));
 }