crypto-js

A JavaScript library of crypto standards - hashing, HMAC, PBKDF2, and symmetric ciphers for Node.js and the browser.

Library
npm
v4.2.0
16,400stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
44/100Fair
Development Activity0
Maintenance0
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
69/100Good
Architecture72
Code Quality68
Innovation71
Learning Curve78

CryptoJS is a widely used JavaScript library that implements a broad set of cryptographic standards in pure JavaScript, so the same code runs in Node.js and the browser without native bindings. It provides hashers (MD5, SHA-1, SHA-2, SHA-3, RIPEMD-160), HMAC, the PBKDF2 key-derivation function, and symmetric ciphers including AES, TripleDES, Rabbit, and RC4, along with a rich set of encoders, block-cipher modes, and padding schemes.

Its modular design lets you import only the algorithms you need (for example crypto-js/sha256 or crypto-js/aes) to keep bundles small, or pull in the full CryptoJS object for access to every primitive. Note that active development has been discontinued in favor of the platform-native Crypto module, but the library remains extremely popular for API signing, password hashing, and interoperable AES encryption.

What You Get

  • Hash functions: MD5, SHA-1, SHA-224/256/384/512, SHA-3, and RIPEMD-160
  • HMAC variants for every supported hash and the PBKDF2 key-derivation function
  • Symmetric ciphers: AES, TripleDES, Rabbit, RC4, and Blowfish with OpenSSL-compatible formatting
  • Configurable block-cipher modes (CBC, CFB, CTR, OFB, ECB) and padding schemes (PKCS7, ANSI X.923, ISO-10126, zero, no-padding)
  • Encoders for Latin1, UTF-8, UTF-16, Hex, Base64, and URL-safe Base64

Common Use Cases

  • Signing API requests by hashing and HMAC-signing payloads on the client
  • Encrypting and decrypting data with AES that interoperates with OpenSSL and other implementations
  • Deriving keys from passwords using PBKDF2 before encryption or storage

Under The Hood

Architecture

CryptoJS is organized as a single global CryptoJS object progressively extended by self-invoking modules. The foundation in src/core.js defines CryptoJS.lib (Base, WordArray, BufferedBlockAlgorithm, Hasher) and CryptoJS.enc, where WordArray - an array of 32-bit words plus a byte length - is the universal data type passed between every primitive. Algorithm modules such as src/sha256.js and src/aes.js register themselves onto CryptoJS.algo and expose convenience wrappers (e.g. CryptoJS.SHA256, CryptoJS.AES.encrypt); block ciphers layer through cipher-core.js, which supplies mode (mode-cbc) and padding (pad-pkcs7) strategies and the OpenSSL-compatible key-derivation/serialization format.

Tech Stack

The library is written in pure ES5 JavaScript with zero runtime dependencies, deliberately avoiding native bindings so identical code runs in Node.js, browsers, and web workers; the only platform touch point is core.js detecting a native crypto object for cryptographically secure random numbers. Builds are driven by Grunt (Gruntfile.js, grunt/) with JSHint linting configured via .jshintrc, and modules are authored as UMD-style IIFEs so both CommonJS require and AMD/RequireJS consumers work.

Code Quality

The repository carries a substantial test suite - roughly 66 files under test/ (e.g. aes-test.js, sha256-test.js, hmac-md5-test.js) exercising standard test vectors for each algorithm - giving good confidence in correctness against known-answer values. The code is mature and stable but shows its age: ES5 var declarations, no TypeScript types shipped in-tree, and terse single-letter shortcuts (C, C_lib, C_algo) that favor brevity over readability.

API Design

The public API is compact and ergonomic: hashing is a one-liner (CryptoJS.SHA256('message')), AES encryption returns a chainable CipherParams whose toString() yields OpenSSL-formatted ciphertext, and modular paths like crypto-js/sha256 keep bundles small. The main friction is stringly-typed configuration (passing a passphrase string vs. a WordArray key silently changes behavior) and reliance on external GitBook documentation rather than rich in-repo API docs, which can surprise newcomers around key handling.

Used by 39 apps in this directory

Go
72%
GPL 3.0

1Panel

Devops · Hosting Control Panel · Monitoring

36,573

The only open-source VPS control panel with native AI agent runtime — deploy websites, Docker stacks, and local LLMs from one web interface.

View details
91
Repo Health
76
Technical
67
Dependency
Built with
Go72%
Vue28%
Updated today
TypeScript
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
JavaScript
100%
Other

Automatisch

Automation · No Code Platforms

13,936

Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.

View details
49
Repo Health
78
Technical
64
Dependency
Built with
JavaScript100%
Updated 6 months ago
Go
52%
MIT

Bytebase

Devops

14,396

An open-source database CI/CD and DevSecOps platform — schema migration review, GitOps-driven changes, data masking, and access control across MySQL, PostgreSQL, Oracle, Snowflake, MongoDB, and more.

View details
92
Repo Health
73
Technical
69
Dependency
Built with
Go52%
TypeScript39%
Updated today
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,041

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
65
Dependency
Built with
JavaScript99%
Updated 6 days ago
Java
48%
Apache 2.0

ClearFlask

Product Management · Community

448

Open-source feedback management and roadmap tool that lets product teams collect, prioritize, and respond to user input — with AI-powered summarization and full self-hosting control.

View details
83
Repo Health
73
Technical
63
Dependency
Built with
Java48%
TypeScript47%
Updated 2 weeks ago
Java
78%
GPL 3.0

DataEase

Analytics · Data Engineering · AI Assistants

24,346

Open-source BI tool with drag-and-drop dashboards, 20+ data source connectors, and AI-powered natural language queries — a self-hosted alternative to Tableau.

View details
94
Repo Health
71
Technical
66
Dependency
Built with
Java78%
Vue22%
Updated today
TypeScript
88%
MIT

DevTools-X

Developer Tools

1,532

41 offline-first developer utilities in a single 10MB cross-platform desktop app — no Electron, no cloud, no compromise.

View details
51
Repo Health
68
Technical
68
Dependency
Built with
TypeScript88%
Updated 2 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search