import * as crypto from "node:crypto";
export default {
async fetch(request, env, ctx) {
const apiStatus = {
argon2: typeof crypto.argon2,
argon2Sync: typeof crypto.argon2Sync,
scrypt: typeof crypto.scrypt,
pbkdf2: typeof crypto.pbkdf2,
};
return Response.json(
{
supported: false,
apiStatus
},
{ status: 500 }
);
}
};
get response
{"supported":false,"apiStatus":{ "argon2":"undefined", "argon2Sync":"undefined", "scrypt":"function", "pbkdf2":"function"}}
even scrtpt is supported, but argon2 is not, I dont know why.
doc says
All node:crypto APIs are fully supported in Workers
but not all
get response
{"supported":false,"apiStatus":{ "argon2":"undefined", "argon2Sync":"undefined", "scrypt":"function", "pbkdf2":"function"}}even scrtpt is supported, but argon2 is not, I dont know why.
doc says
All node:crypto APIs are fully supported in Workersbut not all