Пример #1
0
        public void FooterCanBeParsed()
        {
            string footerText = "Hello friend";

            Assert.Equal(footerText, PasetoUtility.ParseFooter(PasetoUtility.EncryptBytes(_symmetricKey, new byte[0], footerText)));

            var footerJson = new Dictionary <string, object> {
                ["hello"] = "friend"
            };

            Assert.Equal(footerJson, PasetoUtility.ParseFooterJson(PasetoUtility.Encrypt(_symmetricKey, new PasetoInstance {
                Footer = footerJson
            })));
        }