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) –