On this page
  1. ssl.RAND_bytes
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

ssl.RAND_bytes

Prev: ssl.RAND_add | Up: ssl | Next: ssl.RAND_status
Rel: ssl.AlertDescription, ssl.cert_time_to_seconds, ssl.CertificateError, ssl.create_connection
Ref: docs.python.org — ssl.RAND_bytes
Tags: #public #python3 #stdlib #ssl


Import

import ssl
from ssl import RAND_bytes

Signature & Overview

ssl.RAND_bytes(n, /)

Generate n cryptographically strong pseudo-random bytes.

Usage

import ssl

raw = ssl.RAND_bytes(16)
assert isinstance(raw, bytes) and len(raw) == 16

Gotchas

REPL Inspect

from ssl import RAND_bytes
help(RAND_bytes)

Linked from

Related notes