aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/hkdf/hkdf.odin
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2026-02-12 18:26:39 +0100
committerGitHub <noreply@github.com>2026-02-12 18:26:39 +0100
commitc9f53fdfd70f9b90c9dfca9d01af482ce121d7c4 (patch)
treeb2a725d684c4da52757591c864828554a919db8d /core/crypto/hkdf/hkdf.odin
parent1159110e735ba84d651f4bbc4e9883fd83e9eddc (diff)
parentc0300a33039ab003cbf105c082fe43de4b17ab96 (diff)
Merge pull request #6264 from Kelimion/mem_to_runtime
Replace trivial `core:mem` imports with `base:runtime`.
Diffstat (limited to 'core/crypto/hkdf/hkdf.odin')
-rw-r--r--core/crypto/hkdf/hkdf.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/crypto/hkdf/hkdf.odin b/core/crypto/hkdf/hkdf.odin
index b3a6bf303..b2b515676 100644
--- a/core/crypto/hkdf/hkdf.odin
+++ b/core/crypto/hkdf/hkdf.odin
@@ -5,9 +5,9 @@ See: [[ https://www.rfc-editor.org/rfc/rfc5869 ]]
*/
package hkdf
+import "core:crypto"
import "core:crypto/hash"
import "core:crypto/hmac"
-import "core:mem"
// extract_and_expand derives output keying material (OKM) via the
// HKDF-Extract and HKDF-Expand algorithms, with the specified has
@@ -18,7 +18,7 @@ extract_and_expand :: proc(algorithm: hash.Algorithm, salt, ikm, info, dst: []by
tmp: [hash.MAX_DIGEST_SIZE]byte
prk := tmp[:h_len]
- defer mem.zero_explicit(raw_data(prk), h_len)
+ defer crypto.zero_explicit(raw_data(prk), h_len)
extract(algorithm, salt, ikm, prk)
expand(algorithm, prk, info, dst)
@@ -83,7 +83,7 @@ expand :: proc(algorithm: hash.Algorithm, prk, info, dst: []byte) {
if r > 0 {
tmp: [hash.MAX_DIGEST_SIZE]byte
blk := tmp[:h_len]
- defer mem.zero_explicit(raw_data(blk), h_len)
+ defer crypto.zero_explicit(raw_data(blk), h_len)
_F(&base, prev, info, n + 1, blk)
copy(dst_blk, blk)