From fa1ce4dc8697aa013596f1dff3bef66f0e65b668 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 14 Aug 2024 16:46:34 -0400 Subject: [PATCH] Add GetHashCode to SHA256 --- BeefLibs/corlib/src/Security/Cryptography/SHA256.bf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BeefLibs/corlib/src/Security/Cryptography/SHA256.bf b/BeefLibs/corlib/src/Security/Cryptography/SHA256.bf index 8a99fa5b..609a0a75 100644 --- a/BeefLibs/corlib/src/Security/Cryptography/SHA256.bf +++ b/BeefLibs/corlib/src/Security/Cryptography/SHA256.bf @@ -2,7 +2,7 @@ using System.IO; namespace System.Security.Cryptography { - struct SHA256Hash : IParseable + struct SHA256Hash : IParseable, IHashable { public uint8[32] mHash; @@ -64,6 +64,12 @@ namespace System.Security.Cryptography #unwarn HashEncode.HashEncode64(((uint64*)&mHash)[3], outStr); } + + public int GetHashCode() + { +#unwarn + return *(int*)&mHash; + } } class SHA256