def generateRandom(self, size=<NUM_LIT:16>):
low_rand = ckbytelist([<NUM_LIT:0>] * size)<EOL>rv = self.lib.C_GenerateRandom(self.session, low_rand)<EOL>if rv != CKR_OK:<EOL><INDENT>raise PyKCS11Error(rv)<EOL><DEDENT>return low_rand<EOL>
C_GenerateRandom

:param size: number of random bytes to get
:type size: integer

:note: the returned value is an instance of :class:`ckbytelist`.
  You can easly convert it to a binary string with:
  ``bytes(random)``
  or, for Python 2:
  ``''.join(chr(i) for i in random)``