Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 1, 2024 via pnpm

crypto-js 3.1.4

Modularized port of googlecode project crypto-js.
Package summary
Share
5
issues
3
critical severity
vulnerability
2
license
1
2
moderate severity
vulnerability
2
1
license
1
N/A
Package created
7 May 2013
Version published
1 Apr 2015
Maintainers
1
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

5

3 critical severity issues

critical
Recommendation: Upgrade to version 4.2.0 or later
via: crypto-js@3.1.4
Recommendation: Upgrade to version 4.2.0 or later
via: crypto-js@3.1.4
Recommendation: Check the package code and files for license information
via: crypto-js@3.1.4
Collapse
Expand

2 moderate severity issues

moderate
Recommendation: Upgrade to version 3.2.1 or later
via: crypto-js@3.1.4
Recommendation: Upgrade to version 3.2.1 or later
via: crypto-js@3.1.4
Collapse
Expand

Licenses

N/A

N/A
1 Packages, Including:
crypto-js@3.1.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of crypto-js 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does crypto-js do?

Crypto-js is an extensive JavaScript library of cryptographic standards. This npm package can be implemented to perform a wide array of crypto standards including but not limited to MD5, SHA-1, SHA-256, HMAC-SHA512, AES Encryption, and methods within the OpenSSL library. It simplifies the process of applying intricate cryptographic solutions within your application development process.

How do you use crypto-js?

Using crypto-js is straightforward, requiring a node.js environment and npm for the installation. After installing the package using npm install crypto-js, the methods can be imported directly using ES6 methods or using require if you want different modules or all the libraries. For generating hashed data, the desired method can be called with the correct arguments, for example:

import sha256 from 'crypto-js/sha256';
console.log(sha256("Your Message"));

When it comes to encrypting and decrypting plaintext or objects, it's as simple as using the encrypt and decrypt methods from the AES module:

var CryptoJS = require("crypto-js");
// Encrypt
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString();
// Decrypt
var bytes  = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var originalText = bytes.toString(CryptoJS.enc.Utf8);
console.log(originalText); // 'my message'

Where are the crypto-js docs?

The official documents of crypto-js, which include additional usage examples and API definitions, can be accessed at https://cryptojs.gitbook.io/docs/. You can find a comprehensive list of modules, detailed usage explanations, and learn about new features or fixes in the latest versions.