Beispiel #1
0
        public static byte[] ReadAllBytes(string path, string key, string iv)
        {
            var text = File.ReadAllBytes(path);

            return(AESUtil.Decrypt(text, key, iv));
        }
Beispiel #2
0
        public static string GetString(string key, string defaultValue = default(string))
        {
            var result = PlayerPrefs.GetString(MD5Util.GetMd5(key));

            return(string.IsNullOrEmpty(result) ? defaultValue : AESUtil.Decrypt(result, AESKey.DefaultKey, AESKey.DefaultIV));
        }
Beispiel #3
0
        public static string ReadAllText(string path, string key, string iv)
        {
            var text = File.ReadAllText(path);

            return(AESUtil.Decrypt(text, key, iv));
        }