Exemple #1
0
        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);
        }
Exemple #2
0
        public void CryptoHashSHA256ArrayTest()
        {
            var actual = CryptoHash.SHA256(Encoding.ASCII.GetBytes("Adam Caudill"));

            CollectionAssert.AreEqual(Utilities.HexToBinary(SHA256_HASH), actual);
        }
Exemple #3
0
        public void CryptoHashSHA256StringTest()
        {
            var actual = CryptoHash.SHA256("Adam Caudill");

            CollectionAssert.AreEqual(Utilities.HexToBinary(SHA256_HASH), actual);
        }