mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Add GetHashCode to SHA256
This commit is contained in:
parent
9f94d4588f
commit
fa1ce4dc86
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,7 @@ using System.IO;
|
||||||
|
|
||||||
namespace System.Security.Cryptography
|
namespace System.Security.Cryptography
|
||||||
{
|
{
|
||||||
struct SHA256Hash : IParseable<SHA256Hash>
|
struct SHA256Hash : IParseable<SHA256Hash>, IHashable
|
||||||
{
|
{
|
||||||
public uint8[32] mHash;
|
public uint8[32] mHash;
|
||||||
|
|
||||||
|
@ -64,6 +64,12 @@ namespace System.Security.Cryptography
|
||||||
#unwarn
|
#unwarn
|
||||||
HashEncode.HashEncode64(((uint64*)&mHash)[3], outStr);
|
HashEncode.HashEncode64(((uint64*)&mHash)[3], outStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetHashCode()
|
||||||
|
{
|
||||||
|
#unwarn
|
||||||
|
return *(int*)&mHash;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SHA256
|
class SHA256
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue