Skip to content

Commit 73791fe

Browse files
committed
Python example code block formatting
1 parent d61695e commit 73791fe

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

python/README.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ content-encoding <https://tools.ietf.org/html/draft-nottingham-http-encryption-e
66

77
# Use
88

9-
```python
10-
import http_ece
11-
import os, base64
12-
13-
key = os.urandom(16)
14-
salt = os.urandom(16)
15-
data = os.urandom(100)
16-
17-
encrypted = http_ece.encrypt(data, salt=salt, key=key)
18-
decrypted = http_ece.decrypt(encrypted, salt=salt, key=key)
19-
assert data == decrypted
20-
```
9+
.. code-block:: python
10+
11+
import http_ece
12+
import os, base64
13+
14+
key = os.urandom(16)
15+
salt = os.urandom(16)
16+
data = os.urandom(100)
17+
18+
encrypted = http_ece.encrypt(data, salt=salt, key=key)
19+
decrypted = http_ece.decrypt(encrypted, salt=salt, key=key)
20+
assert data == decrypted
2121
2222
This also supports the static-ephemeral ECDH mode.
2323

0 commit comments

Comments
 (0)