1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

refactor(op_crates/crypto): Prefix ops with "op_crypto_" (#9067)

This commit is contained in:
Yacine Hmito 2021-01-15 01:24:38 +01:00 committed by GitHub
parent b8303c7812
commit 836e22112a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View file

@ -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;
}

View file

@ -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],

View file

@ -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,
);
}