From d2a8aef18877f3af5ced183730f89526b92ecd14 Mon Sep 17 00:00:00 2001 From: Beyley Thomas Date: Wed, 27 Dec 2023 17:37:11 -0800 Subject: [PATCH] ResourceHelper: Remove XorAlloc --- Refresh.GameServer/Resources/ResourceHelper.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Refresh.GameServer/Resources/ResourceHelper.cs b/Refresh.GameServer/Resources/ResourceHelper.cs index 8e980630..dcdd5f48 100644 --- a/Refresh.GameServer/Resources/ResourceHelper.cs +++ b/Refresh.GameServer/Resources/ResourceHelper.cs @@ -113,18 +113,6 @@ public static byte[] PspDecrypt(Span data, ReadOnlySpan key) return decompressed.AsSpan().ToArray(); } - public static byte[] XorAlloc(ReadOnlySpan data, ReadOnlySpan key) - { - //Allocate the new array - byte[] result = new byte[data.Length]; - //Copy the old data to the result - data.CopyTo(result); - //XOR the output array - Xor(result, key); - //Return the result - return result; - } - public static void Xor(Span data, ReadOnlySpan key) { if (key.Length < data.Length) throw new ArgumentException("Key must be as long or longer than the data!", nameof(key));