Tworzenie metody hashblock przy użyciu algorytmu mieszania SHA256

Blockchain.prototype.hashBlock = function(prevBlockHash, currentBlockData, nonce) {
    const dataString  = prevBlockHash + nonce.toString() + JSON.stringify(currentBlockData);
    const hash = sha256(dataString);

    return hash;
}
Outrageous Ostrich