Exemple #1
0
 public string Encrypt(string text, string key = null)
 {
     return(string.IsNullOrEmpty(key) ?
            GenericAESCryption.EncryptString(text) : GenericAESCryption.EncryptString(text, key));
 }
Exemple #2
0
        public IHttpActionResult GetEncryptionKey()
        {
            string key = ConfigManager.GetAppSetting("EncryptionKey", string.Empty);

            return(Ok(GenericAESCryption.EncryptString(key)));
        }