Skip to content

Commit c58c5e8

Browse files
committed
Package rearrangement
1 parent 2bbc8cf commit c58c5e8

11 files changed

Lines changed: 67 additions & 74 deletions

File tree

README.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
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.

nodejs/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
decrypt.js

nodejs/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE

nodejs/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.

nodejs/decrypt2.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

nodejs/encrypt2.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

nodejs/gcm.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

nodejs/package.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
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" },

python/setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
)

0 commit comments

Comments
 (0)