Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. hash1 = "ca4974b7e8538aba9103bedef89f4426bc95f4c5a4f36d2ac2754290fa745b79"
  2. hash2 = "aa54ec82fa33f048e2b728eaa2eaaadae3ee6c48a730766ab8e7ffb459ce870e"
  3.  
  4. bithash1 = bin(int(hash1, 16))[2:].zfill(256)
  5. bithash2 = bin(int(hash2, 16))[2:].zfill(256)
  6.  
  7. diffbits = 0
  8.  
  9. for x, y in zip(bithash1, bithash2):
  10. if x != y:
  11. diffbits = diffbits + 1
  12.  
  13. print(diffbits)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement