How to generate a 24bit hash using Python?


A random 24 bit hash is just random 24 bits. You can generate these just using the random module. 

example

import random
hash = random.getrandbits(24)
print(hex(hash))

Output

This will give the output

0x94fbee

Updated on: 05-Mar-2020

341 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements