Skip to content

Instantly share code, notes, and snippets.

@qzaidi
qzaidi / pbewithmd5anddes.js
Last active June 1, 2020 22:09
Emulates Java's insecure PBEWITHMD5ANDDES with node.js crypto. Useful for interop with old java programs.
"use strict";
/*
* Emulates Java's PBEWITHMD5ANDDES for node.js
*/
var crypto = require('crypto');
var pbewithmd5anddes = {
KDF: function(password,salt,iterations) {