Esempio n. 1
0
        public dynamic decypt_data(Decryptdatamodel obj)
        {
            dynamic objenc = new ExpandoObject();

            try
            {
                //	string json = JsonConvert.SerializeObject(obj);

                //string iv = CryptLib.GenerateRandomIV(16);
                //string key = CryptLib.getHashSha256("GSWS TEST", 31);

                string encrypttext = EncryptDecryptAlgoritham.DecryptStringAES(obj.encryprtext, obj.key, obj.Ivval);
                objenc.Status = "100";
                objenc.Result = encrypttext;
                return(objenc);
            }
            catch (Exception ex)
            {
                objenc.Status = 102;
                objenc.Reason = ex.Message.ToString();
                return(objenc);
            }
        }