summaryrefslogtreecommitdiff
path: root/ext/node/ops/crypto/mod.rs
diff options
context:
space:
mode:
authorFelipe Baltor <fbaltor@gmail.com>2023-06-26 23:04:49 -0300
committerGitHub <noreply@github.com>2023-06-27 11:04:49 +0900
commit814edcdd570b3fbef2001f7e6434320743a8f834 (patch)
treedb47be5770509341c0a25e1a402b0cf06b1aa58c /ext/node/ops/crypto/mod.rs
parenta8d472f88e79703b1890bfdc87d7a3bb20b21428 (diff)
test(ext/node): port crypto_test.ts from deno_std (#19561)
Diffstat (limited to 'ext/node/ops/crypto/mod.rs')
-rw-r--r--ext/node/ops/crypto/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/node/ops/crypto/mod.rs b/ext/node/ops/crypto/mod.rs
index a83263fff..1155a4d15 100644
--- a/ext/node/ops/crypto/mod.rs
+++ b/ext/node/ops/crypto/mod.rs
@@ -89,6 +89,11 @@ pub fn op_node_create_hash(state: &mut OpState, algorithm: &str) -> u32 {
}
#[op(fast)]
+pub fn op_node_get_hashes() -> Vec<&'static str> {
+ digest::Hash::get_hashes()
+}
+
+#[op(fast)]
pub fn op_node_hash_update(state: &mut OpState, rid: u32, data: &[u8]) -> bool {
let context = match state.resource_table.get::<digest::Context>(rid) {
Ok(context) => context,