コード例 #1
0
        public void RoundTripPrivate()
        {
            const string payload   = "Love is stronger than hate or fear";
            string       encrypted = PasetoUtility.EncryptBytes(_symmetricKey, Encoding.UTF8.GetBytes(payload), nonce: new byte[24]);

            Assert.Equal(payload, Encoding.UTF8.GetString(PasetoUtility.DecryptBytes(_symmetricKey, encrypted).Payload));
        }