Ejemplo n.º 1
0
        public static string UnlockText(string s)
        {
            int    i   = s.IndexOf(">> ");
            string key = s.Substring(2, i - 2);

            return(Obfuscation.Lock(s.Substring(i + 3), key, false));
        }
Ejemplo n.º 2
0
        public static string UnshiftText(string s)
        {
            string hex = s.Substring(0, 2);
            int    i   = int.Parse(hex, System.Globalization.NumberStyles.HexNumber);

            s = s.Substring(2);
            return(Obfuscation.Shift(s, -i));
        }
Ejemplo n.º 3
0
        public static string ShiftText(string s)
        {
            Random r      = new Random(CryptoRandomNumber.Next());
            int    rndmin = r.Next(7, 44);
            int    rndmax = r.Next(66, 127);
            int    rnd    = r.Next(rndmin, rndmax);

            string hex = rnd.ToString("X2");

            return(hex + Obfuscation.Shift(s, rnd));
        }
Ejemplo n.º 4
0
        public static string LockText(string s)
        {
            string key = CreateKey();

            return("<<" + key + ">> " + Obfuscation.Lock(s, key, true));
        }