Searched refs:token_bytes (Results 1 – 6 of 6) sorted by relevance
34 def token_bytes(nbytes=None): function59 return binascii.hexlify(token_bytes(nbytes)).decode('ascii')71 tok = token_bytes(nbytes)
81 for func in (secrets.token_bytes, secrets.token_hex,94 self.assertEqual(len(secrets.token_bytes(None)), size)101 self.assertIsInstance(secrets.token_bytes(n), bytes)102 self.assertEqual(len(secrets.token_bytes(n)), n)
65 .. function:: token_bytes([nbytes=None])73 >>> token_bytes(16) #doctest:+SKIP
115 Use :func:`secrets.token_bytes` instead.
337 key = secrets.token_bytes(16)392 key = secrets.token_bytes(16)
258 enc_key=secrets.token_bytes(16),