#NEWLINE# def randomByteString( len ) : #NEWLINE# #INDENT# '\n    Generate a string of random bytes.\n    ' #NEWLINE# ll = int ( ( ( _ / 8 ) + int ( ( ( len % 8 ) > 0 ) ) ) ) #NEWLINE# return b'' . join ( [ struct . pack ( '!Q' , random . getrandbits ( 64 ) ) for _ in xrange ( 0 , ll ) ] ) [ : len ]