Tuesday, 2 April 2019

How to hash a dictionary?

I wanted to know if you could hash a dictionary? Currently playing around with Blockchain! Here's the code I would like to hash:

def add_transactions():

    transaction = {

      "previous_block_hash": previous_block_hash() ,

      "index": increase_index(),

      "item": item(),

      "timestamp": datetime.datetime.now(),

      "sender": get_sender(),

      "receiver": get_receiver()

    }

Wanted to know the best way to apply hashlib to get 256 value a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2



from How to hash a dictionary?

No comments:

Post a Comment