You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently found out that the crypto Node.js module is not asynchronous.
In my application, I am validating a JWT token on every request, so should I worry about the fact that this module is synchronous? My biggest concern is that this module could block the event loop.
Thanks in advance. :)
The text was updated successfully, but these errors were encountered:
Most crypto work is synchronous, but there are a few exceptions (e.g. random bytes generation, key pair generation, PBKDF2/scrypt).
For a lot of operations, and in particular hashes, I would expect the overhead of moving tasks to a threadpool to outweigh the cost of a synchronous call.
There are some cases where this is a known issue though, see e.g. nodejs/node#28404.
crypto
I recently found out that the
crypto
Node.js module is not asynchronous.In my application, I am validating a JWT token on every request, so should I worry about the fact that this module is synchronous? My biggest concern is that this module could block the event loop.
Thanks in advance. :)
The text was updated successfully, but these errors were encountered: