From bbd41a549c8bf156f10313a78f0018aaa2244d59 Mon Sep 17 00:00:00 2001 From: de4dot Date: Thu, 26 Jul 2012 16:35:28 +0200 Subject: [PATCH] Add MD5 and SHA256 sum methods --- de4dot.code/deobfuscators/DeobUtils.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/de4dot.code/deobfuscators/DeobUtils.cs b/de4dot.code/deobfuscators/DeobUtils.cs index 8ac0d8fb..d7f20539 100644 --- a/de4dot.code/deobfuscators/DeobUtils.cs +++ b/de4dot.code/deobfuscators/DeobUtils.cs @@ -79,6 +79,14 @@ namespace de4dot.code.deobfuscators { return true; } + public static byte[] md5Sum(byte[] data) { + return MD5.Create().ComputeHash(data); + } + + public static byte[] sha256Sum(byte[] data) { + return SHA256.Create().ComputeHash(data); + } + public static byte[] aesDecrypt(byte[] data, byte[] key, byte[] iv) { using (var aes = new RijndaelManaged { Mode = CipherMode.CBC }) { using (var transform = aes.CreateDecryptor(key, iv)) {