So basically, I generate 16 random bytes and i then convert them to Base64. I need to transform this Base64 to an Int. I've searched all over the internet, i found out how to convert to hex, and many other but none seem to work. This is the code I use to generate the nonce :
import base64
nonce = base64.encodebytes(os.urandom(16))
I need a function a bit like the parseInt() in JavaScript. The result need to be between -9223372036854775808 and 9223372036854775807.