Esempio n. 1
0
        public VariableItem Execute(List <VariableItem> param)
        {
            if (param.Count() != 2)
            {
                throw new Exception("sleep error! Count of params not valid! ");
            }

            var fuscator = new GarbageFuscator();
            var ret      = fuscator.Crypt((string)param[0].Data, (string)param[1].Data);

            ret = fuscator.Decrypt((string)param[0].Data, ret);
            return(new VariableItem((object)ret));
        }
Esempio n. 2
0
        public VariableItem Function(string name, List <VariableItem> param)
        {
            if (name == "Crypt")
            {
                if (param.Count != 2)
                {
                    throw new Exception("function Crypt take 2 parameters!");
                }

                return(new VariableItem((object)_gb.Crypt((string)param[0].Data, (string)param[1].Data)));
            }

            if (name == "Decrypt")
            {
                if (param.Count != 2)
                {
                    throw new Exception("function Decrypt take 2 parameters!");
                }

                return(new VariableItem((object)_gb.Decrypt((string)param[0].Data, (string)param[1].Data)));
            }

            return(new VariableItem("nil"));
        }