Is your feature request related to a problem? Please describe
When working with crypto functions like createHash I would like to support the same algorithms that the underlying openssl supports.
In my current container I can do:
echo "test" | openssl dgst -sha3-256 -hex -r
But nginx reports:
js exception: TypeError: not supported algorithm: "sha3-256"
at createHash (native)
at hash_token (/etc/nginx/njs/hashtoken.js:4)
Describe the solution you'd like
JS code I want to run:
return require('crypto').createHash('sha3-256')
.update(r.variables.api_key).update(r.variables.hash_secret)
.digest('hex');
Additional context
Nginx version: nginx/1.29.6
built by gcc 14.2.0 (Debian 14.2.0-19)
OS: Linux 6.12.76-linuxkit
njs:0.9.6
Is your feature request related to a problem? Please describe
When working with crypto functions like
createHashI would like to support the same algorithms that the underlying openssl supports.In my current container I can do:
But nginx reports:
Describe the solution you'd like
JS code I want to run:
Additional context
Nginx version:
nginx/1.29.6njs:
0.9.6