cryptojs.js

JavaScript implementations of standard and secure cryptographic algorithms.

Usage no npm install needed!

<script type="module">
  import cryptojsJs from 'https://cdn.skypack.dev/cryptojs.js';
</script>

README

cryptojs

JavaScript implementations of standard and secure cryptographic algorithms.

Node.js (Install)

Requirements:

  • Node.js
  • npm (Node.js package manager)
npm install cryptojs.js

Usage

Including all libraries, for access to extra methods:

const CryptoJS = require("cryptojs.js");

// encrypt
var ciphertext = CryptoJS.encrypt("plaintext", "Secret Passphrase");
console.log(ciphertext);

// decrypt
var plaintext = CryptoJS.decrypt(ciphertext, "Secret Passphrase");   
// XluzvcUwZFU=3MD2vMz8PHySPJlKZiWjJg==1Gv6n6Tv8azr
console.log(plaintext);