mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Change MD5 to SHA256 in the CreateKey method
This commit is contained in:
parent
1b31859786
commit
d6540f1351
|
@ -554,7 +554,6 @@ namespace WelsonJS.Cryptography
|
||||||
public class ECB
|
public class ECB
|
||||||
{
|
{
|
||||||
private static readonly int BLOCK_SIZE = 16;
|
private static readonly int BLOCK_SIZE = 16;
|
||||||
|
|
||||||
private ARIA engine = null;
|
private ARIA engine = null;
|
||||||
|
|
||||||
public ECB(byte[] key)
|
public ECB(byte[] key)
|
||||||
|
@ -581,9 +580,9 @@ namespace WelsonJS.Cryptography
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected byte[] CreateKey(string key)
|
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;
|
return hashData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user