Skip to content

Instantly share code, notes, and snippets.

@adrianlzt
adrianlzt / aes_cryptojs_pycrypto.js
Last active September 24, 2024 01:17
Interoperable CryptoJS (defaults) <-> PyCrypto
/*
* CryptoJS by default:
* - uses CBC mode
* - pkcs7 for padding
* - evpKDF to extract key
* - part of the key is used as IV
* - before converting to base64 it makes "Salt__"+salt+encrypted_text
*/
var CryptoJS = require('crypto-js');