public void CreateAIS_URL(int kind) { string s = string.Empty; string str = string.Empty; switch (kind) { case 0: s = this.AIS_Check_URL; str = "ais_check_url.dat"; break; case 1: s = this.AIS_System_URL; str = "ais_system_url.dat"; break; case 2: s = this.AIS_UploadChara_URL; str = "ais_uploadChara_url.dat"; break; case 3: s = this.AIS_UploadHousing_URL; str = "ais_uploadHousing_url.dat"; break; case 4: s = this.AIS_Version_URL; str = "ais_version_url.dat"; break; } byte[] buffer = YS_Assist.EncryptAES(Encoding.UTF8.GetBytes(s), "aisyoujyo", "phpaddress"); string path = Application.get_dataPath() + "/../DefaultData/url/" + str; string directoryName = Path.GetDirectoryName(path); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } using (FileStream fileStream = new FileStream(path, FileMode.Create, FileAccess.Write)) { using (BinaryWriter binaryWriter = new BinaryWriter((Stream)fileStream)) binaryWriter.Write(buffer); } }
public void SaveHandleName(string hn) { this.HandleName = hn; File.WriteAllBytes(UserData.Create("system/") + "hn.dat", YS_Assist.EncryptAES(Encoding.UTF8.GetBytes(this.HandleName), "illusion", "ai-syoujyo")); }