mirror of
https://github.com/BtbN/ClanServer.git
synced 2026-09-07 07:55:16 -05:00
De/Encrypt in-place to enhance performance
This commit is contained in:
@@ -22,13 +22,12 @@ namespace eAmuseTest
|
||||
|
||||
compress = compress.ToLower();
|
||||
|
||||
IEnumerable<byte> decryptedData = data;
|
||||
if (eamuse_info != null)
|
||||
decryptedData = RC4.ApplyEAmuseInfo(eamuse_info, data);
|
||||
RC4.ApplyEAmuseInfo(eamuse_info, data);
|
||||
|
||||
var rawData = decryptedData;
|
||||
byte[] rawData = data;
|
||||
if (compress == "lz77")
|
||||
rawData = LZ77.Decompress(decryptedData);
|
||||
rawData = LZ77.Decompress(data).ToArray();
|
||||
else if (compress != "none")
|
||||
throw new ArgumentException("Unsupported compression algorithm");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user