예제 #1
0
        public void LoadHandleName()
        {
            string path = UserData.Create("system/") + "hn.dat";

            if (File.Exists(path))
            {
                try
                {
                    this.HandleName = Encoding.UTF8.GetString(YS_Assist.DecryptAES(File.ReadAllBytes(path), "illusion", "ai-syoujyo"));
                }
                catch (Exception ex)
                {
                    this.HandleName = string.Empty;
                }
            }
            else
            {
                this.HandleName = string.Empty;
            }
        }
예제 #2
0
        public static string LoadURL(string urlFile)
        {
            byte[] srcData = (byte[])null;
            string path    = Application.get_dataPath() + "/../DefaultData/url/" + urlFile;

            if (!File.Exists(path))
            {
                return(string.Empty);
            }
            using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
            {
                using (BinaryReader binaryReader = new BinaryReader((Stream)fileStream))
                    srcData = binaryReader.ReadBytes((int)fileStream.Length);
            }
            if (srcData == null)
            {
                return(string.Empty);
            }
            return(Encoding.UTF8.GetString(YS_Assist.DecryptAES(srcData, "aisyoujyo", "phpaddress")));
        }