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);
            }
        }
        public dynamic Decry_data(Decryptdatamodel obj)
        {
            ResponseModel _objres = new ResponseModel();

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

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

                string     encrypttext = new CryptLib().decrypt(obj.encryprtext, key, obj.Ivval);
                LoginModel objl        = JsonConvert.DeserializeObject <LoginModel>(encrypttext);

                DataTable dtl = new DataTable();                // GetLoginData_Sp(objl);
                if (dtl != null && dtl.Rows.Count > 0)
                {
                    _objres.Status   = 100;
                    _objres.DataList = dtl;
                }
                else
                {
                    _objres.Status   = 102;
                    _objres.DataList = dtl;
                    _objres.Reason   = "Invalid Username or Password";
                }
                return(_objres);
            }
            catch (Exception ex)
            {
                _objres.Status = 102;

                _objres.Reason = ex.Message.ToString();
                return(_objres);
            }
        }