def hash_block
      hash_string = [index,timestamp,data,prev_hash].join
      sha = Digest::SHA256.new
      sha.update(hash_string)
      sha.hexdigest
    end
def hash_block
      hash_string = [index,timestamp,data,prev_hash].join
      sha = Digest::SHA256.new
      sha.update(hash_string)
      sha.hexdigest
    end
def hash_block hash_string = [ index , timestamp , data , prev_hash ] . join sha = Digest :: SHA256 . new sha . update ( hash_string ) sha . hexdigest end
Create the blocks hash by encrypting all the blocks data using SHA256
Create the blocks hash by encrypting all the blocks data using SHA256