mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
refactor(op_crates/crypto): Prefix ops with "op_crypto_" (#9067)
This commit is contained in:
parent
b8303c7812
commit
836e22112a
3 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue