Skip to content

Files

Latest commit

 

History

History
 
 

python

encrypted-content-encoding

A simple implementation of the HTTP encrypted content-encoding

Use

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