aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/pbkdf2/pbkdf2.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/pbkdf2/pbkdf2.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/pbkdf2/pbkdf2.odin')
-rw-r--r--core/crypto/pbkdf2/pbkdf2.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/crypto/pbkdf2/pbkdf2.odin b/core/crypto/pbkdf2/pbkdf2.odin
index c96855b9c..9d8394031 100644
--- a/core/crypto/pbkdf2/pbkdf2.odin
+++ b/core/crypto/pbkdf2/pbkdf2.odin
@@ -5,10 +5,10 @@ See: [[ https://www.rfc-editor.org/rfc/rfc2898 ]]
*/
package pbkdf2
+import "core:crypto"
import "core:crypto/hash"
import "core:crypto/hmac"
import "core:encoding/endian"
-import "core:mem"
// derive invokes PBKDF2-HMAC with the specified hash algorithm, password,
// salt, iteration count, and outputs the derived key to dst.
@@ -71,7 +71,7 @@ derive :: proc(
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, salt, iterations, u32(l + 1), blk)
copy(dst_blk, blk)
@@ -84,7 +84,7 @@ _F :: proc(base: ^hmac.Context, salt: []byte, c: u32, i: u32, dst_blk: []byte) {
tmp: [hash.MAX_DIGEST_SIZE]byte
u := tmp[:h_len]
- defer mem.zero_explicit(raw_data(u), h_len)
+ defer crypto.zero_explicit(raw_data(u), h_len)
// F (P, S, c, i) = U_1 \xor U_2 \xor ... \xor U_c
//