예제 #1
0
        public string DecryptTextblock()
        {
            Encoding cp437 = Encoding.GetEncoding(437);

            List <byte> sDecrypted = new List <byte>();

            char sChar = '0';

            for (int x = 0; x < Data.Length; x++)
            {
                sChar = Data[x];

                if (sChar >= 32)
                {
                    if ((int)sChar > 0xFF)
                    {
                        sDecrypted.Add((byte)(BtrieveUtility.GetDecode((int)sChar) - 32));
                    }
                    else
                    {
                        sDecrypted.Add((byte)(sChar - 32));
                    }
                }
            }

            return(Encoding.ASCII.GetString(sDecrypted.ToArray()).Replace("'", "''"));
        }