crypto-js

utility security

crypto-js is a JavaScript library that implements various crypto standards. It allows easy integration of encryption and hashing functionality in web applications.

Latest Ver 4.2.0
Homepage
Github
0
16,089
Cryptos speak the hidden truths.
Experience a powerful and flexible encryption library for your data security.
Data encryption and hashing library for JavaScript
License: MIT
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/aes.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/aes.min.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/blowfish.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/blowfish.min.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/cipher-core.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/cipher-core.min.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/core.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/core.min.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.js
https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js

Sample Code

⚠️ Some code, including import statements, may not run properly on jsFiddle. If it fails to execute, please copy the code and try it in your own environment.
📄 HTML
<div id='example'>
  <p id='encrypted'>Encrypted Text:</p>
  <p id='decrypted'>Decrypted Text:</p>
</div>

🧩 External JS
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>

⚙️ JavaScript
var CryptoJS = require('crypto-js');
var originalText = 'Hello, World!';
var key = CryptoJS.enc.Utf8.parse('1234567890123456');
var iv = CryptoJS.enc.Utf8.parse('1234567890123456');
var encrypted = CryptoJS.AES.encrypt(originalText, key, { iv: iv });
document.getElementById('encrypted').innerHTML += ' ' + encrypted;
var decrypted = CryptoJS.AES.decrypt(encrypted, key, { iv: iv });
document.getElementById('decrypted').innerHTML += ' ' + decrypted.toString(CryptoJS.enc.Utf8);
⚡ Top Tools for Developers
Text Compare

Text Comparison

Easily spot the differences between two texts.

Favicon Generator

Favicon Generator

Quickly and easily generate favicons.

Lorem Ipsum Generator

Lorem Ipsum Generator

Generate placeholder text for your designs.

Character Counter

Character Counter

Check character and word count in real time.

SRT ↔ SMI

SRT ↔ SMI Converter

Easily convert between subtitle formats.

Text Extract(OCR)

Image Text Extractor

Automatically extract text from images.