private byte[] GetVerifierHash() { var master = CryptWithPassword(_encryptedMasterKey); var verifier = CryptoHash.SHA256(master); Array.Clear(master, 0, master.Length); Array.Resize(ref verifier, 16); return(verifier); }
public void CryptoHashSHA256ArrayTest() { var actual = CryptoHash.SHA256(Encoding.ASCII.GetBytes("Adam Caudill")); CollectionAssert.AreEqual(Utilities.HexToBinary(SHA256_HASH), actual); }
public void CryptoHashSHA256StringTest() { var actual = CryptoHash.SHA256("Adam Caudill"); CollectionAssert.AreEqual(Utilities.HexToBinary(SHA256_HASH), actual); }