0
我正在使用下面的代码散列数据,它工作正常。 拿着从 crypto website节点js中的反向哈希?
const crypto = require('crypto');
const secret = 'abcdefg';
const hash = crypto.createHmac('sha256', secret)
.update('I love cupcakes')
.digest('hex');
console.log(hash);
// Prints:
// c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
我的问题是代码如何扭转呢? 如何将数据再次散列为正常文本?
你没有。这就是散列的意思。您可能正在寻找* encryption *。 – Robert
[哈希和加密算法之间的根本区别]的可能副本(https://stackoverflow.com/questions/4948322/fundamental-difference-between-hashing-and-encryption-algorithms) –