Nodejs代码
var crypto = require("crypto");
var cypher = crypto.createCipher("aes192", "pass");
var out = cypher.update("TEST1","utf8", "binary");
out += cypher.final("binary");
console.log(out);
NODE OUTPUT:
´_ËT~R dE{
命令行:
echo -n "TEST1" | openssl enc -aes192
CLI OUTPUT:
Salted__?
????X-N??R?*a8 P9?t%
我做错了什么?
PD:是的,我知道这些是二进制输出,但它们显然不匹配。答案 0 :(得分:1)
你错过了openssl的-nosalt
标志。