Пример #1
0
        public void GivenAString_WhenComputeHmac_CorrectHashShouldBeReturned(string input, string expectedHash)
        {
            string hash = CryptoHashUtility.ComputeHmacSHA256Hash(input, TestHashKey);

            Assert.Equal(expectedHash, hash);
        }
 public CryptoHashProcessor(string cryptoHashKey)
 {
     _cryptoHashKey      = cryptoHashKey;
     _cryptoHashFunction = (input) => CryptoHashUtility.ComputeHmacSHA256Hash(input, _cryptoHashKey);
 }