summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/crypto/hash.ts
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/polyfills/internal/crypto/hash.ts
parenta8d472f88e79703b1890bfdc87d7a3bb20b21428 (diff)
test(ext/node): port crypto_test.ts from deno_std (#19561)
Diffstat (limited to 'ext/node/polyfills/internal/crypto/hash.ts')
-rw-r--r--ext/node/polyfills/internal/crypto/hash.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/node/polyfills/internal/crypto/hash.ts b/ext/node/polyfills/internal/crypto/hash.ts
index 34e3c1230..51c9ec955 100644
--- a/ext/node/polyfills/internal/crypto/hash.ts
+++ b/ext/node/polyfills/internal/crypto/hash.ts
@@ -229,6 +229,14 @@ export function createHash(algorithm: string, opts?: TransformOptions) {
return new Hash(algorithm, opts);
}
+/**
+ * Get the list of implemented hash algorithms.
+ * @returns Array of hash algorithm names.
+ */
+export function getHashes() {
+ return ops.op_node_get_hashes();
+}
+
export default {
Hash,
Hmac,