JavaScript library of cryptographic standards. Provides implementations of hash functions (MD5, SHA-1, SHA-256, SHA3, RIPEMD-160), HMAC, symmetric ciphers (AES, DES, TripleDES, RC4, Rabbit, RabbitLegacy, PBKDF2, EvpKDF) and encoders (Base64, Hex, Latin1, Utf8, Utf16). Ideal for client-side encryption where Node.js crypto module is unavailable. Version 4.3.6 is the latest stable release. It is a direct port of popular C++ crypto++ library algorithms to JavaScript, with no external dependencies. Not recommended for new projects due to security concerns (insecure default modes, lack of authenticated encryption). Use the Web Crypto API or Node.js crypto module instead.
npm install crypto-javascriptNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Encrypt and decrypt a string using AES with a passphrase. Shows import of specific modules and conversion to/from strings.
Use Web Crypto API (SubtleCrypto) or Node.js crypto module with authenticated encryption like AES-GCM.
Always handle decryption result: if returned string is empty, decryption failed.
Use deep imports like 'crypto-js/aes' instead of 'crypto-js'.
Only import modules listed in package.json, e.g., 'crypto-js/aes' or 'crypto-js/sha256'.
Use .toString(encUtf8) or .toString(encHex).
No dependency data recorded yet.