Package Exports
- browserify-cryptojs
- browserify-cryptojs/components/aes
- browserify-cryptojs/components/cipher-core
- browserify-cryptojs/components/enc-base64
- browserify-cryptojs/components/evpkdf
- browserify-cryptojs/components/md5
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browserify-cryptojs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CryptoJS
Port of CryptoJS for using with CommonJS.
Original project: https://code.google.com/p/crypto-js/
Usage with Browserify
window.CryptoJS = require('./path/to/crypto-js');
require('./path/to/crypto-js/components/enc-base64');
require('./path/to/crypto-js/components/md5');
require('./path/to/crypto-js/components/evpkdf');
require('./path/to/crypto-js/components/cipher-core');
require('./path/to/crypto-js/components/aes');
Encryption/Decryption
var passphrase = 'MyKeyHere';
var encrypted = CryptoJS.AES.encrypt('ssshhhhh!', passphrase); // .toString() for just string
var decrypted = CryptoJS.AES.decrypt(encrypted, passphrase); // .toString(CryptoJS.enc.Utf8) for getting back `ssshhhhh!`