Created
September 19, 2014 20:13
-
-
Save dacur/68c31255155f7408f1bc to your computer and use it in GitHub Desktop.
Using CryptoJS to encrypt strings, e.g., passwords is as easy as adding the following lines of code to your app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //add to your index page | |
| <script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script> | |
| // add to your JS file, for instance, on a click 'submit' button | |
| password = $('#password').val(); | |
| password = CryptoJS.MD5(password); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment