Remove length parameter from xxxteaDecrypt()

This commit is contained in:
de4dot 2012-02-11 16:46:02 +01:00
parent 6400a93276
commit e5a72396c2
2 changed files with 3 additions and 2 deletions

View File

@ -220,7 +220,7 @@ namespace de4dot.code.deobfuscators.CodeVeil {
var encryptedData = new uint[data.Length / 4];
Buffer.BlockCopy(data, 0, encryptedData, 0, data.Length);
DeobUtils.xxteaDecrypt(encryptedData, encryptedData.Length, key);
DeobUtils.xxteaDecrypt(encryptedData, key);
var decryptedData = new byte[data.Length];
Buffer.BlockCopy(encryptedData, 0, decryptedData, 0, data.Length);

View File

@ -91,8 +91,9 @@ namespace de4dot.code.deobfuscators {
}
// Code converted from C implementation @ http://en.wikipedia.org/wiki/XXTEA (btea() func)
public static void xxteaDecrypt(uint[] v, int n, uint[] key) {
public static void xxteaDecrypt(uint[] v, uint[] key) {
const uint DELTA = 0x9E3779B9;
int n = v.Length;
uint rounds = (uint)(6 + 52 / n);
uint sum = rounds * DELTA;
uint y = v[0];