File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # encrypted-content-encoding
1+ # Encryped Content-Encoding for HTTP
22
3- A simple implementation of the [ HTTP encrypted
4- content-encoding] ( https://tools.ietf.org/html/draft-nottingham-http-encryption-encoding )
3+ nodejs and python implementations are available.
54
6- # Use
7-
8- ``` js
9- var ece = require (' encrypted-content-encoding' );
10- var crypto = require (' crypto' )
11- var base64 = require (' base64url' );
12-
13- var parameters = {
14- key: base64 .encode (crypto .randomBytes (16 )),
15- salt: base64 .encode (crypto .randomBytes (16 ))
16- };
17- var encrypted = ece .encrypt (data, parameters);
18-
19- var decrypted = ece .encrypt (encrypted, parameters);
20-
21- require (' assert' ).equal (decrypted .compare (data), 0 );
5+ ``` sh
6+ npm install http_ece
7+ pip install http_ece
228```
23-
24- This also supports the static-ephemeral ECDH mode. The source explains how.
25-
26- # TODO
27-
28- Use the node streams API instead of the legacy APIs.
Original file line number Diff line number Diff line change 1+ decrypt.js
Original file line number Diff line number Diff line change 1+ ../LICENSE
Original file line number Diff line number Diff line change 1+ # encrypted-content-encoding
2+
3+ A simple implementation of the [ HTTP encrypted
4+ content-encoding] ( https://tools.ietf.org/html/draft-nottingham-http-encryption-encoding )
5+
6+ # Use
7+
8+ ``` js
9+ var ece = require (' encrypted-content-encoding' );
10+ var crypto = require (' crypto' )
11+ var base64 = require (' base64url' );
12+
13+ var parameters = {
14+ key: base64 .encode (crypto .randomBytes (16 )),
15+ salt: base64 .encode (crypto .randomBytes (16 ))
16+ };
17+ var encrypted = ece .encrypt (data, parameters);
18+
19+ var decrypted = ece .encrypt (encrypted, parameters);
20+
21+ require (' assert' ).equal (decrypted .compare (data), 0 );
22+ ```
23+
24+ This also supports the static-ephemeral ECDH mode. The source explains how.
25+
26+ # TODO
27+
28+ Use the node streams API instead of the legacy APIs.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
2- "name" : " encrypted-content-encoding" ,
3- "version" : " 0.1.0" ,
2+ "name" : " http_ece" ,
3+ "version" : " 0.2.0" ,
4+ "description" : " Encrypted Content-Encoding for HTTP" ,
5+ "homepage" : " https://github.com/martinthomson/encrypted-content-encoding" ,
6+ "bugs" : " https://github.com/martinthomson/encrypted-content-encoding/issues" ,
7+ "author" : {
8+ "name" : " Martin Thomson" ,
9+ "email" : " martin.thomson@gmail.com"
10+ },
11+ "repository" : {
12+ "type" : " git" ,
13+ "url" : " https://github.com/martinthomson/encrypted-content-encoding.git"
14+ },
15+ "license" : " MIT" ,
416 "main" : " ./ece.js" ,
517 "scripts" : { "test" : " node ./test.js" },
618 "engines" : { "node" : " >=0.12" },
File renamed without changes.
Original file line number Diff line number Diff line change 1+ from setuptools import setup
2+
3+ setup (
4+ name = 'http_ece' ,
5+ version = '1.0.0' ,
6+ author = 'Martin Thomson' ,
7+ author_email = 'martin.thomson@gmail.com' ,
8+ scripts = [],
9+ packages = ['http_ece' ],
10+ description = 'Encrypted Content Encoding for HTTP' ,
11+ long_description = 'Enciper HTTP Messages' ,
12+ install_requires = [
13+ 'pyelliptic' , 'cryptography'
14+ ],
15+ url = 'https://github.com/martinthomson/encrypted-content-encoding' ,
16+ license = 'MIT'
17+ )
You can’t perform that action at this time.
0 commit comments