dimanche 23 octobre 2016

Convert 16 bytes of random data to integer in Python

I have generated a random 16 byte string. It looks like this:

b'\xb68 \xe9L\xbd\x97\xe0\xd6Q\x91c\t\xc3z\\'

I want to convert this to a (positive) integer. What's the best way to do this in Python?

I appreciate the help.




Aucun commentaire:

Enregistrer un commentaire