debian-http-ece/README.rst

29 lines
555 B
ReStructuredText
Raw Normal View History

2018-11-04 15:39:05 +01:00
encrypted-content-encoding
==========================
A simple implementation of the `HTTP encrypted
2023-12-07 11:05:33 +01:00
content-encoding <https://tools.ietf.org/html/rfc8188>`_
2018-11-04 15:39:05 +01:00
Use
---
.. code-block:: python
import http_ece
import os, base64
key = os.urandom(16)
salt = os.urandom(16)
data = os.urandom(100)
encrypted = http_ece.encrypt(data, salt=salt, key=key)
decrypted = http_ece.decrypt(encrypted, salt=salt, key=key)
assert data == decrypted
This also supports the static-ephemeral ECDH mode.
TODO
----
Provide a streaming API