Skip to content
Snippets Groups Projects
Commit af424262 authored by Donald Stufft's avatar Donald Stufft
Browse files

Merge pull request #46 from dstufft/fix-code-block

Use code-block
parents ec5ad83a fa507b4a
No related branches found
No related tags found
No related merge requests found
......@@ -7,13 +7,13 @@ are typically passed as a keyword argument `encoder` to various methods.
For example you can generate a signing key and encode it in hex with:
.. code:: python
.. code-block:: python
hex_key = nacl.signing.SigningKey.generate().encode(encoder=nacl.encoding.HexEncoder)
Then you can later decode it from hex:
.. code:: python
.. code-block:: python
signing_key = nacl.signing.SigningKey(hex_key, encoder=nacl.encoding.HexEncoder)
......@@ -43,7 +43,7 @@ Defining your own Encoder
Defining your own encoder is easy. Each encoder is simply a class with 2 static
methods. For example here is the hex encoder:
.. code:: python
.. code-block:: python
import binascii
......
......@@ -37,7 +37,7 @@ generated from both pairing of keys, so given two keypairs belonging to alice
(pkalice, skalice) and bob(pkbob, skbob), the key derived from (pkalice, skbob)
with equal that from (pkbob, skalice). This is how the system works:
.. code:: python
.. code-block:: python
import nacl.utils
from nacl.public import PrivateKey, Box
......
......@@ -13,7 +13,7 @@ other than the length.
Example
-------
.. code:: python
.. code-block:: python
import nacl.secret
import nacl.utils
......
......@@ -17,7 +17,7 @@ Example
Signer's perspective (:class:`~nacl.signing.SigningKey`)
.. code:: python
.. code-block:: python
import nacl.encoding
import nacl.signing
......@@ -36,7 +36,7 @@ Signer's perspective (:class:`~nacl.signing.SigningKey`)
Verifier's perspective (:class:`~nacl.signing.VerifyKey`)
.. code:: python
.. code-block:: python
import nacl.signing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment