public string GetCookies() { #if DEBUG if (!Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + "db4objects" + Path.DirectorySeparatorChar + "ObjectManagerEnterprise")) { //Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + "db4objects"); Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + "db4objects" + Path.DirectorySeparatorChar + "ObjectManagerEnterprise"); } #endif string filepath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + "db4objects" + Path.DirectorySeparatorChar + "ObjectManagerEnterprise" + Path.DirectorySeparatorChar + "encyr.info"; if (File.Exists(filepath)) { byte[] contents; using (FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read)) { contents = new byte[fs.Length]; fs.Read(contents, 0, (int)fs.Length); } if (contents.Length > 0) { string info = ByteArrayToStr(contents); return(objCryptoDES.DESSelfDecrypt(info)); } } return(null); }
public static string DecryptPass(byte[] array) { CryptoDES objCryptoDES = new CryptoDES(); objCryptoDES.Initialize(); string info = ByteArrayToStr(array); info = objCryptoDES.DESSelfDecrypt(info); return(info); }
public static string DecryptPass(byte[] array) { CryptoDES objCryptoDES = new CryptoDES(); objCryptoDES.Initialize(); string info = ByteArrayToStr(array); info = objCryptoDES.DESSelfDecrypt(info); return info; }