core:crypto/hash: Add a generic higher level hash interface

There is a lot of code duplicated in convenience methods in each hash
implementation, and having a generic hash type makes implementing
higher-level constructs such as HMAC significantly easier down the road.
This commit is contained in:
Yawning Angel
2024-02-07 00:37:18 +09:00
parent ca10fc2d47
commit 00ab3beed9
18 changed files with 1531 additions and 2255 deletions
+2
View File
@@ -27,6 +27,7 @@ import blake2b "core:crypto/blake2b"
import blake2s "core:crypto/blake2s"
import chacha20 "core:crypto/chacha20"
import chacha20poly1305 "core:crypto/chacha20poly1305"
import crypto_hash "core:crypto/hash"
import keccak "core:crypto/legacy/keccak"
import md5 "core:crypto/legacy/md5"
import sha1 "core:crypto/legacy/sha1"
@@ -137,6 +138,7 @@ _ :: lru
_ :: list
_ :: topological_sort
_ :: crypto
_ :: crypto_hash
_ :: blake2b
_ :: blake2s
_ :: chacha20