node.js DES 加密
function cipher (buffer, key) {
var cip = crypto.createCipheriv('des-cbc', key, key);
var result = cip.update(buffer);
result += cip.final('base64');
return result;
}
function cipher (buffer, key) {
var cip = crypto.createCipheriv('des-cbc', key, key);
var result = cip.update(buffer);
result += cip.final('base64');
return result;
}