aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/_chacha20/chacha20.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/crypto/_chacha20/chacha20.odin')
-rw-r--r--core/crypto/_chacha20/chacha20.odin8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/crypto/_chacha20/chacha20.odin b/core/crypto/_chacha20/chacha20.odin
index 1a4b5a507..7d94d8a95 100644
--- a/core/crypto/_chacha20/chacha20.odin
+++ b/core/crypto/_chacha20/chacha20.odin
@@ -1,8 +1,8 @@
package _chacha20
+import "core:crypto"
import "core:encoding/endian"
import "core:math/bits"
-import "core:mem"
// KEY_SIZE is the (X)ChaCha20 key size in bytes.
KEY_SIZE :: 32
@@ -88,8 +88,8 @@ seek :: proc(ctx: ^Context, block_nr: u64) {
// reset sanitizes the Context. The Context must be re-initialized to
// be used again.
reset :: proc(ctx: ^Context) {
- mem.zero_explicit(&ctx._s, size_of(ctx._s))
- mem.zero_explicit(&ctx._buffer, size_of(ctx._buffer))
+ crypto.zero_explicit(&ctx._s, size_of(ctx._s))
+ crypto.zero_explicit(&ctx._buffer, size_of(ctx._buffer))
ctx._is_initialized = false
}
@@ -116,4 +116,4 @@ check_counter_limit :: proc(ctx: ^Context, nr_blocks: int) {
}
ensure(ctr_ok, "crypto/chacha20: maximum (X)ChaCha20 keystream per IV reached")
-}
+} \ No newline at end of file