Cryptlib to encrypt user id and password


#1

Hello, I just wanted to know how to use the “cryptlib” to encrypt user id and password just before logging in to a app (Post request).
https://www.npmjs.com/package/cryptlib#run-code-sample


#2

See:


#3

This is a no good, very bad, terrible idea.

Nobody who is asking questions like this on community support forums should be attempting to roll their own cryptographic protocols. To anybody who stumbles across this thread: simply use SSL. Letsencrypt provides free SSL certificates. Get one for your server and use https. You do not want to be dealing with low-level cryptographic primitives.