aboutsummaryrefslogtreecommitdiff
path: root/src/node-fallbacks/crypto.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node-fallbacks/crypto.js')
-rw-r--r--src/node-fallbacks/crypto.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/node-fallbacks/crypto.js b/src/node-fallbacks/crypto.js
index 7745530da..65ae2f5b3 100644
--- a/src/node-fallbacks/crypto.js
+++ b/src/node-fallbacks/crypto.js
@@ -12,6 +12,27 @@ export const randomUUID = () => {
return crypto.randomUUID();
};
+const harcoded_curves = [
+ "p192",
+ "p224",
+ "p256",
+ "p384",
+ "p521",
+ "curve25519",
+ "ed25519",
+ "secp256k1",
+ "secp224r1",
+ "prime256v1",
+ "prime192v1",
+ "ed25519",
+ "secp384r1",
+ "secp521r1",
+];
+
+export function getCurves() {
+ return harcoded_curves;
+}
+
export const timingSafeEqual =
"timingSafeEqual" in crypto
? (a, b) => {
@@ -89,4 +110,5 @@ export default {
scryptSync,
scrypt,
webcrypto,
+ getCurves,
};