JSPM

browserify-cryptojs

0.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 58
  • Score
    100M100P100Q77971F

CryptoJS in CommonJS

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/

Install

$ bower install browserify-cryptojs

$ npm install browserify-cryptojs

Usage with Browserify

window.CryptoJS = require('browserify-cryptojs');
require('browserify-cryptojs/components/enc-base64');
require('browserify-cryptojs/components/md5');
require('browserify-cryptojs/components/evpkdf');
require('browserify-cryptojs/components/cipher-core');
require('browserify-cryptojs/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!`