Esempio n. 1
0
 public static void SetString(string key, string value)
 {
     PlayerPrefs.SetString(MD5Util.GetMD5(key), AESUtil.Encrypt(value, AESKey.DefaultKey, AESKey.DefaultIV));
 }
Esempio n. 2
0
        public static void WriteAllText(string path, string text, string key, string iv)
        {
            var bs = AESUtil.Encrypt(text, key, iv);

            File.WriteAllText(path, bs);
        }
Esempio n. 3
0
        public static void WriteAllBytes(string path, byte[] bytes, string key, string iv)
        {
            var bs = AESUtil.Encrypt(bytes, key, iv);

            File.WriteAllBytes(path, bs);
        }
Esempio n. 4
0
 /// <summary>
 /// 向表单中添加一条字段,字段的key和value将通过AES默认密钥加密
 /// </summary>
 /// <param name="wwwForm"></param>
 /// <param name="field"></param>
 /// <param name="value"></param>
 public static void AddFieldAESAll(this WWWForm wwwForm, string field, string value)
 {
     wwwForm.AddField(AESUtil.Encrypt(field, AESKey.DefaultKey, AESKey.DefaultIV), AESUtil.Encrypt(value, AESKey.DefaultKey, AESKey.DefaultIV));
 }