def generate_wcs(length=14):
 assert (type(length) in six.integer_types)
 return u''.join([random.choice(WCS_SECRET_CHARSET) for _ in range(length)]).encode('ascii')

def generate_wcs ( length = 14 ) : assert ( type ( length ) in six . integer_types ) return u'' . join ( [ random . choice ( WCS_SECRET_CHARSET ) for _ in range ( length ) ] ) . encode ( 'ascii' )
generates a new random secret for use with wamp-cra .