예제 #1
0
        public void ValidateNames()
        {
            byte[] key      = Guid.NewGuid().ToByteArray();
            string keyCheck = Convert.ToBase64String(key);

            Assert.IsTrue(JwtRoot.GetAlgorithm(JwtHelper.ConvertToJwtHashAlgorithm("HS256"), key) is HMACSHA256);
            Assert.IsTrue(JwtRoot.GetAlgorithm(JwtHelper.ConvertToJwtHashAlgorithm("HS384"), key) is HMACSHA384);
            Assert.IsTrue(JwtRoot.GetAlgorithm(JwtHelper.ConvertToJwtHashAlgorithm("HS512"), key) is HMACSHA512);
        }