예제 #1
0
        public void TestComputeHmac256()
        {
            string expected = "2e68979459ebc0e7fcf0f2db3b4aef383835337e271152286e1ea1ad59080a57";       //comparing with result produced at https://codebeautify.org/hmac-generator

            byte[] bhashStr = encryptionService.ComputeHmacsha256(bdata, bkey);
            string hashStr  = ByteArrayToString(bhashStr);

            Assert.AreEqual(expected, hashStr);
        }