Пример #1
0
        public ActionResult EncryptData()
        {
            var model = new EncryptedDataViewModel()
            {
                IsEnabled = !string.IsNullOrEmpty(_configurationClient.GetConfiguration().EncryptionKey)
            };

            return(View("EncryptData", model));
        }
Пример #2
0
        public ActionResult EncryptData(string variableValue)
        {
            string encryptedValue = "";

            if (!string.IsNullOrEmpty(variableValue))
            {
                encryptedValue = _encryptor.Encrypt(variableValue);
            }

            var model = new EncryptedDataViewModel()
            {
                IsEnabled      = true,
                PlainValue     = variableValue ?? string.Empty,
                EncryptedValue = encryptedValue
            };

            return(View("EncryptData", model));
        }