- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to generate a random 128 bit strings using Python?
You can generate these just random 128-bit strings using the random module's getrandbits function that accepts a number of bits as an argument.
example
import random hash = random.getrandbits(128) print(hex(hash))
Output
This will give the output −
0xa3fa6d97f4807e145b37451fc344e58c
Advertisements