12345678910111213141516171819202122232425262728 |
- namespace XGame.Framework.Network
- {
- /// <summary>
- /// 消息加密器
- /// </summary>
- public interface IMsgEncryptor
- {
- void SetKey(string key);
- /// <summary>
- /// 加密
- /// 结果替换原变量
- /// </summary>
- /// <param name="bytes"></param>
- /// <param name="offset"></param>
- /// <param name="length"></param>
- /// <returns></returns>
- void Encrypt(ref byte[] bytes, ref int offset, ref int length);
- /// <summary>
- /// 解密
- /// 结果替换原变量
- /// </summary>
- /// <param name="bytes"></param>
- /// <param name="offset"></param>
- /// <param name="length"></param>
- /// <returns></returns>
- void Decrypt(ref byte[] bytes, ref int offset, ref int length);
- }
- }
|