All string generated with urandom(x) were using binascii + os.urandom + encode. In python3 os.urandom has a hex method.