# Cryptlib to encrypt user id and password

**URL:** <https://forum.ionicframework.com/t/cryptlib-to-encrypt-user-id-and-password/130183>\
**Category:** ionic-v3\
**Created:** [May 10, 2018, 11:32am UTC](https://forum.ionicframework.com/t/cryptlib-to-encrypt-user-id-and-password/130183 "2018-05-10T11:32:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uddyvky](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/uddyvky/32/121897_2.png) [@uddyvky](https://forum.ionicframework.com/u/uddyvky)\
**Post date:** [May 10, 2018, 11:32am UTC](https://forum.ionicframework.com/t/cryptlib-to-encrypt-user-id-and-password/130183/1 "2018-05-10T11:32:56Z")

</div>

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](https://www.npmjs.com/package/cryptlib#run-code-sample)

---

<div class="post-metadata">

**Author:** ![robinyo](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/robinyo/32/115964_2.png) [@robinyo](https://forum.ionicframework.com/u/robinyo)\
**Post date:** [May 10, 2018, 8:40pm UTC](https://forum.ionicframework.com/t/cryptlib-to-encrypt-user-id-and-password/130183/2 "2018-05-10T20:40:37Z")

</div>

See:

- [https://cordova.apache.org/docs/en/latest/guide/appdev/security/](https://cordova.apache.org/docs/en/latest/guide/appdev/security/)
- [https://github.com/OWASP/owasp-mstg](https://github.com/OWASP/owasp-mstg)
- [https://github.com/OWASP/owasp-mstg/blob/master/Document/0x08-Testing-Tools.md](https://github.com/OWASP/owasp-mstg/blob/master/Document/0x08-Testing-Tools.md)
- [https://www.owasp.org/images/6/61/MASVS\_v0.9.4.pdf](https://www.owasp.org/images/6/61/MASVS_v0.9.4.pdf)

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 10, 2018, 9:24pm UTC](https://forum.ionicframework.com/t/cryptlib-to-encrypt-user-id-and-password/130183/3 "2018-05-10T21:24:11Z")

</div>

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](https://letsencrypt.org/) provides free SSL certificates. Get one for your server and use https. You do not want to be dealing with low-level cryptographic primitives.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:36pm UTC](https://forum.ionicframework.com/t/cryptlib-to-encrypt-user-id-and-password/130183/4 "2021-07-19T21:36:49Z")

</div>

Closed on July 19, 2021, 9:36pm UTC


