From d6540f1351f9fba61de078818e4d80e8beb120be Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 9 Dec 2024 17:17:39 +0900 Subject: [PATCH] Change MD5 to SHA256 in the CreateKey method --- WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/ARIA.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/ARIA.cs b/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/ARIA.cs index d034d98..cde67af 100644 --- a/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/ARIA.cs +++ b/WelsonJS.Toolkit/WelsonJS.Toolkit/Cryptography/ARIA.cs @@ -554,7 +554,6 @@ namespace WelsonJS.Cryptography public class ECB { private static readonly int BLOCK_SIZE = 16; - private ARIA engine = null; public ECB(byte[] key) @@ -581,9 +580,9 @@ namespace WelsonJS.Cryptography /// protected byte[] CreateKey(string key) { - MD5 md5Hasher = MD5.Create(); + SHA256 hasher = SHA256.Create(); + byte[] hashData = hasher.ComputeHash(Encoding.Default.GetBytes(key)); - byte[] hashData = md5Hasher.ComputeHash(Encoding.Default.GetBytes(key)); return hashData; }