in python i'm using the Crypto package to generate a random number of length 256 bit. The function for doing so is
import Crypto.Random.random as rand
key = rand.getrandbits(256)
This gives something like:
112699108505435943726051051450940377552177626778909564691673845134467691053980
Now my is question how do i transform this number to a string of all ascii characters? Is there a build in function for doing so or do i need to convert it to binary and split it up in blocks of eight ones and zeros and do it myself?
Thans in advance.