当前位置:首页 » 密码管理 » 游戏存档加密

游戏存档加密

发布时间: 2023-09-11 04:23:55

1. 橙光怎么设置存档位上锁

存档则悉上锁在存档设置里面,自己设置一下加密就好。
橙光游戏存档方法:点击“缘起”进入游戏点右下角的莲花出现四个选择条,点击记忆然后按一下就变成下面的样子了并握点击返回,下回玩的时候点击“读取”把绝盯庆那个框条按一下就可以载入了。
所谓橙光游戏指的是使用橙光文字游戏制作工具所制作出来的文字游戏,玩家在游戏中可以攻略男主或女主,可以统领后宫,可以仗剑江湖,可以完成梦想,可以与喜欢的明星朝夕相处。利用橙光文字游戏制作工具可以轻松制作出自己的橙光游戏。

2. 如何在 unity3D 游戏存档加密

存档文件, 被修改起来现在变的很容易了, 为了解决这个问题,请用下面的代码,修改playerPrefs.cs

1.替换

fileReader = new StreamReader(fileName);

serializedInput =DecryptDES(fileReader.ReadLine(), highscore.keyss);
复制代码

2.替换

fileWriter.WriteLine( EncryptDES(serializedOutput , highscore.keyss));

fileWriter.Close();
复制代码

3.

//默认密钥向量

private static byte[] Keys = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };public static string keyss = "1234567z";

/// <summary>

/// DES加密字符串

/// </summary>

/// <param name="encryptString">待加密的字符串</param>

/// <param name="encryptKey">加密密钥,要求为8位</param>

/// <returns>加密成功返回加密后的字符串,失败返回源串</returns>

public static string EncryptDES(string encryptString, string encryptKey)

{

try

{

byte[] rgbKey = Encoding.UTF8.GetBytes(encryptKey.Substring(0, 8));

byte[] rgbIV = Keys;

byte[] inputByteArray = Encoding.UTF8.GetBytes(encryptString);

DESCryptoServiceProvider dCSP = new DESCryptoServiceProvider();

MemoryStream mStream = new MemoryStream();

CryptoStream cStream = new CryptoStream(mStream, dCSP.CreateEncryptor(rgbKey, rgbIV), CryptoStreamMode.Write);

cStream.Write(inputByteArray, 0, inputByteArray.Length);

cStream.FlushFinalBlock();

return Convert.ToBase64String(mStream.ToArray());

}

catch

{

return encryptString;

}

}/// <summary>

/// DES解密字符串

/// </summary>

/// <param name="decryptString">待解密的字符串</param>

/// <param name="decryptKey">解密密钥,要求为8位,和加密密钥相同</param>

/// <returns>解密成功返回解密后的字符串,失败返源串</returns>

public static string DecryptDES(string decryptString, string decryptKey)

{

try

{

byte[] rgbKey = Encoding.UTF8.GetBytes(decryptKey);

byte[] rgbIV = Keys;

byte[] inputByteArray = Convert.FromBase64String(decryptString);

DESCryptoServiceProvider DCSP = new DESCryptoServiceProvider();

MemoryStream mStream = new MemoryStream();

CryptoStream cStream = new CryptoStream(mStream, DCSP.CreateDecryptor(rgbKey, rgbIV), CryptoStreamMode.Write);

cStream.Write(inputByteArray, 0, inputByteArray.Length);

cStream.FlushFinalBlock();

return Encoding.UTF8.GetString(mStream.ToArray());

}

catch

{

return decryptString;

}

}

热点内容
压缩机接线座 发布:2025-07-01 23:17:48 浏览:661
iqoo浏览器缓存路径 发布:2025-07-01 23:12:38 浏览:690
明日之后如何获得最新服务器 发布:2025-07-01 23:12:35 浏览:49
tv加密频道 发布:2025-07-01 23:10:58 浏览:622
如何找到5d4通信密码 发布:2025-07-01 23:03:35 浏览:233
华为pop服务器地址怎么填 发布:2025-07-01 23:02:44 浏览:461
访问量赚钱 发布:2025-07-01 22:47:58 浏览:381
卫士开门软件原始密码是多少 发布:2025-07-01 22:42:17 浏览:956
elp编程 发布:2025-07-01 22:39:21 浏览:103
光遇安卓为什么录制不了视频 发布:2025-07-01 22:39:18 浏览:747