Esempio n. 1
0
 public Byte[] Decrypt(byte[] bytes)
 {
     Byte[] bs = bytes;
     if (AppSetting.isRemote)
     {
         StringEncryption.Encypt(ref bs);
     }
     return(bs);
 }
Esempio n. 2
0
 public byte[] LoadSetting(string url)
 {
     if (!BytesCache.Instance.Contains(url))
     {
         using (System.IO.Stream s = System.IO.File.OpenRead(url))
         {
             byte[] bytes = new byte[s.Length];
             s.Read(bytes, 0, (int)s.Length);
             s.Close();
             Byte[] tmp = bytes;
             if (AppSetting.isRemote)
             {
                 StringEncryption.Encypt(ref tmp);
             }
             BytesCache.Instance.Add(url, tmp);
         }
     }
     //GameObject go = new GameObject();
     return(BytesCache.Instance.Get(url));
 }