Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier alias identifier alias identifier alias identifier ClassDef bases NameLoad body Expr Str decorator_list Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If CompareLt NameLoad Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq NameLoad Num body Expr Call NameLoad Return SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore Num orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Num orelse If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr decorator_list If CompareIs Call NameLoad NameLoad Str NameLoad NameLoad body Delete NameDel Expr Call AttributeLoad NameLoad attr
N/A N/A 
PRNG management routines, thin wrappers.
 N/A os N/A warnings functools partial six integer_types _integer_types OpenSSL._util ffi _ffi lib _lib exception_from_error_queue _exception_from_error_queue path_string _path_string Error N/A Exception N/A N/A 
    An error occurred in an :mod:`OpenSSL.rand` API.

    If the current RAND method supports any errors, this is raised when needed.
    The default method does not raise this when the entropy pool is depleted.

    Whenever this exception is raised directly, it has a list of error messages
    from the OpenSSL error queue, where each item is a tuple *(lib, function,
    reason)*. Here *lib*, *function* and *reason* are all strings, describing
    where and what the problem is.

    See :manpage:`err(3)` for more information.
     N/A N/A _raise_current_error N/A partial _exception_from_error_queue Error N/A _unspecified N/A object N/A _builtin_bytes bytes bytes N/A N/A num_bytes N/A N/A N/A 
    Get some random bytes from the PRNG as a string.

    This is a wrapper for the C function ``RAND_bytes``.

    :param num_bytes: The number of bytes to fetch.

    :return: A string of random bytes.
     N/A N/A N/A isinstance num_bytes _integer_types N/A N/A N/A TypeError num_bytes must be an integer N/A N/A num_bytes 0 N/A N/A N/A ValueError num_bytes must not be negative N/A result_buffer N/A N/A _ffi new char[] num_bytes N/A result_code N/A N/A _lib RAND_bytes result_buffer num_bytes N/A N/A result_code -1 N/A N/A N/A _raise_current_error N/A N/A N/A N/A _ffi buffer result_buffer N/A N/A add N/A N/A buffer entropy N/A N/A N/A 
    Mix bytes from *string* into the PRNG state.

    The *entropy* argument is (the lower bound of) an estimate of how much
    randomness is contained in *string*, measured in bytes.

    For more information, see e.g. :rfc:`1750`.

    :param buffer: Buffer with random data.
    :param entropy: The entropy (in bytes) measurement of the buffer.

    :return: :obj:`None`
     N/A N/A N/A isinstance buffer _builtin_bytes N/A N/A N/A TypeError buffer must be a byte string N/A N/A N/A isinstance entropy int N/A N/A N/A TypeError entropy must be an integer N/A N/A N/A _lib RAND_add buffer N/A len buffer entropy N/A seed N/A N/A buffer N/A N/A N/A 
    Equivalent to calling :func:`add` with *entropy* as the length of *buffer*.

    :param buffer: Buffer with random data

    :return: :obj:`None`
     N/A N/A N/A isinstance buffer _builtin_bytes N/A N/A N/A TypeError buffer must be a byte string N/A N/A N/A _lib RAND_seed buffer N/A len buffer N/A status N/A N/A N/A N/A N/A 
    Check whether the PRNG has been seeded with enough data.

    :return: :obj:`True` if the PRNG is seeded enough, :obj:`False` otherwise.
     N/A N/A N/A _lib RAND_status N/A egd N/A N/A path bytes N/A _unspecified N/A N/A 
    Query the system random source and seed the PRNG.

    Does *not* actually query the EGD.

    .. deprecated:: 16.0.0
        EGD was only necessary for some commercial UNIX systems that all
        reached their ends of life more than a decade ago.  See
        `pyca/cryptography#1636
        <https://github.com/pyca/cryptography/pull/1636>`_.

    :param path: Ignored.
    :param bytes: (optional) The number of bytes to read, default is 255.

    :returns: ``len(bytes)`` or 255 if not specified.
     N/A N/A N/A warnings warn OpenSSL.rand.egd() is deprecated as of 16.0.0. DeprecationWarning N/A N/A N/A isinstance path _builtin_bytes N/A N/A N/A TypeError path must be a byte string N/A N/A bytes _unspecified N/A N/A bytes 255 N/A N/A N/A N/A isinstance bytes int N/A N/A N/A TypeError bytes must be an integer N/A N/A seed N/A N/A os urandom bytes N/A bytes N/A cleanup N/A N/A N/A N/A N/A 
    Erase the memory used by the PRNG.

    This is a wrapper for the C function ``RAND_cleanup``.

    :return: :obj:`None`
     N/A N/A N/A _lib RAND_cleanup N/A load_file N/A N/A filename maxbytes N/A _unspecified N/A N/A 
    Read *maxbytes* of data from *filename* and seed the PRNG with it.

    Read the whole file if *maxbytes* is not specified or negative.

    :param filename: The file to read data from (``bytes`` or ``unicode``).
    :param maxbytes: (optional) The number of bytes to read.    Default is to
        read the entire file.

    :return: The number of bytes read
     N/A filename N/A _path_string filename N/A N/A maxbytes _unspecified N/A N/A maxbytes -1 N/A N/A N/A N/A isinstance maxbytes int N/A N/A N/A TypeError maxbytes must be an integer N/A N/A N/A _lib RAND_load_file filename maxbytes N/A write_file N/A N/A filename N/A N/A N/A 
    Write a number of random bytes (currently 1024) to the file *path*.  This
    file can then be used with :func:`load_file` to seed the PRNG again.

    :param filename: The file to write data to (``bytes`` or ``unicode``).

    :return: The number of bytes written.
     N/A filename N/A _path_string filename N/A N/A N/A _lib RAND_write_file filename N/A screen N/A N/A N/A N/A N/A 
    Add the current contents of the screen to the PRNG state.

    Availability: Windows.

    :return: None
     N/A N/A N/A _lib RAND_screen N/A N/A N/A N/A getattr _lib RAND_screen None None N/A N/A screen N/A N/A N/A _lib ERR_load_RAND_strings