得到一个奇怪的单词数组作为Hash,为什么呢?

时间:2018-07-25 23:05:57

标签: node.js hash

const sha256 = require('crypto-js/sha256');

console.log(sha256("what the hell??"));

我得到:

{ words:
   [ 406305836,
     1416447687,
     86002937,
     -128468725,
     499121450,
     2038973718,
     1880201541,
     -1170628341 ],
  sigBytes: 32 }

那是为什么?

它工作正常,并且在另一台计算机上正常散列。

1 个答案:

答案 0 :(得分:0)

原来我应该添加.toString()

诸如as console.log(sha256("what the hell??").toString());