aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/hkdf
diff options
context:
space:
mode:
Diffstat (limited to 'core/crypto/hkdf')
-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)