Is there a way to do UNIX crypt(3) in javascript (in node.js, specifically)?
crypt(3) uses DES, I guess it can done by openssl, but how to access openssl from javascript?
Thanks
UPDATE
I found how to do it with node-ffi:
var ffi = require('node-ffi');
var libcrypt = ffi.Library('libcrypt', {
'crypt': ['string', ['string', 'string']]
});
console.log(libcrypt.crypt('aa', 'bb'));