diff options
-rw-r--r-- | op_crates/crypto/01_crypto.js | 2 | ||||
-rw-r--r-- | op_crates/crypto/lib.rs | 2 | ||||
-rw-r--r-- | runtime/ops/crypto.rs | 10 |
3 files changed, 9 insertions, 5 deletions
diff --git a/op_crates/crypto/01_crypto.js b/op_crates/crypto/01_crypto.js index 27f630b7e..594fc81b0 100644 --- a/op_crates/crypto/01_crypto.js +++ b/op_crates/crypto/01_crypto.js @@ -36,7 +36,7 @@ arrayBufferView.byteOffset, arrayBufferView.byteLength, ); - core.jsonOpSync("op_get_random_values", {}, ui8); + core.jsonOpSync("op_crypto_get_random_values", {}, ui8); return arrayBufferView; } diff --git a/op_crates/crypto/lib.rs b/op_crates/crypto/lib.rs index d7644166c..61290080d 100644 --- a/op_crates/crypto/lib.rs +++ b/op_crates/crypto/lib.rs @@ -25,7 +25,7 @@ pub fn init(isolate: &mut JsRuntime) { } } -pub fn op_get_random_values( +pub fn op_crypto_get_random_values( state: &mut OpState, _args: Value, zero_copy: &mut [ZeroCopyBuf], diff --git a/runtime/ops/crypto.rs b/runtime/ops/crypto.rs index accd40ab5..8743f8597 100644 --- a/runtime/ops/crypto.rs +++ b/runtime/ops/crypto.rs @@ -1,5 +1,5 @@ -// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -use deno_crypto::op_get_random_values; +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +use deno_crypto::op_crypto_get_random_values; use deno_crypto::rand::rngs::StdRng; use deno_crypto::rand::SeedableRng; @@ -10,5 +10,9 @@ pub fn init(rt: &mut deno_core::JsRuntime, maybe_seed: Option<u64>) { let mut state = op_state.borrow_mut(); state.put::<StdRng>(rng); } - super::reg_json_sync(rt, "op_get_random_values", op_get_random_values); + super::reg_json_sync( + rt, + "op_crypto_get_random_values", + op_crypto_get_random_values, + ); } |