Skip to content

Instantly share code, notes, and snippets.

View AroraShreshth's full-sized avatar
🎯
Working on something amazing

Shreshth Arora AroraShreshth

🎯
Working on something amazing
View GitHub Profile
did:3:kjzl6cwe1jw148azsvm02jwufadskchayhdzya9nnn0kbau22a0g97tzlvjt1qx
const SHA256 = require('crypto-js/sha256');
class Block {
constructor( index, timestamp, data,previousHash =''){
this.index =index;
this.timestamp =timestamp;
this.data =data;
this.previousHash = previousHash;
this.hash = '';
}
calculateHash (){