public void ItShouldEncryptAndDecryptSymmetrically()
        {
            var expected       = "123456";
            var encryptedValue = _unit.EncryptStringAES(expected);
            var actual         = _unit.DecryptStringAES(encryptedValue);

            Assert.AreEqual(expected, actual);
        }
 public void ItShouldThrowAnDecryptionOnEncryptionWithANullSecret()
 {
     Assert.Throws <ArgumentNullException>(() => _unit.DecryptStringAES("13123123"));
 }
        public PermissionCookieModel GetPayload(string payload)
        {
            var json = _crypto.DecryptStringAES(payload);

            return(JsonConvert.DeserializeObject <PermissionCookieModel>(json));
        }