Chacha20Poly1305
Project description
# Chacha20poly1305
Simple pure-python chacha20-poly1305 implementation based on [tlslite-ng] code.
Designed to be compatible with Cryptography API.
```python
import os
from chacha20poly1305 import ChaCha20Poly1305
key = os.urandom(32)
cip = ChaCha20Poly1305(key)
nonce = os.urandom(12)
ciphertext = cip.encrypt(nonce, b'test')
plaintext = cip.decrypt(nonce, ciphertext)
print(plaintext)
```
[tlslite-ng]: https://github.com/tomato42/tlslite-ng
Simple pure-python chacha20-poly1305 implementation based on [tlslite-ng] code.
Designed to be compatible with Cryptography API.
```python
import os
from chacha20poly1305 import ChaCha20Poly1305
key = os.urandom(32)
cip = ChaCha20Poly1305(key)
nonce = os.urandom(12)
ciphertext = cip.encrypt(nonce, b'test')
plaintext = cip.decrypt(nonce, ciphertext)
print(plaintext)
```
[tlslite-ng]: https://github.com/tomato42/tlslite-ng
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chacha20poly1305-0.0.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for chacha20poly1305-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c34281d78c307080aeeb417f44642ca9bc9e81a9fd3c0a6c489eeba9decea6 |
|
MD5 | e113cd1bd2766ce587eb664b5a8b4b35 |
|
BLAKE2b-256 | 7c52f3c274d0a8425c0a2e870f0d6479f63824db87c3edf7b99cae4eae9c8a31 |