datagovsg / singpasspass

Make SingPass Great Again
1 stars 0 forks source link

Verify passwords #13

Open arshadali172 opened 5 years ago

arshadali172 commented 5 years ago

Note:

Why is async mode recommended over sync mode? If you are using bcrypt on a simple script, using the sync mode is perfectly fine. However, if you are using bcrypt on a server, the async mode is recommended. This is because the hashing done by bcrypt is CPU intensive, so the sync version will block the event loop and prevent your application from servicing any other inbound requests or events. The async version uses a thread pool which does not block the main event loop.

For now, I am using bcrypt sync for simplicity

To-do: