# http_ece-legacy

> Encrypted Content-Encoding for HTTP

Latest version **0.5.9** (published 2016-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install http_ece-legacy
pnpm add http_ece-legacy
yarn add http_ece-legacy
bun add http_ece-legacy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.9 |
| Published | 2016-04-19 |
| First published | 2016-04-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Martin Thomson |
| Maintainers | eoger |

## Links

- npm: https://www.npmjs.com/package/http_ece-legacy
- Repository: https://github.com/eoger/encrypted-content-encoding-legacy
- Issues: https://github.com/eoger/encrypted-content-encoding-legacy/issues
- npm.io page: https://npm.io/package/http_ece-legacy

## Dependencies (3)

- [create-ecdh](https://npm.io/package/create-ecdh.md) ^4.0.0
- [node-aes-gcm](https://npm.io/package/node-aes-gcm.md) ^0.1.6
- [urlsafe-base64](https://npm.io/package/urlsafe-base64.md) ~1.0.0

## Recent versions

- 0.5.9 (latest) — 2016-04-19
- 0.5.8 — 2016-04-19
- 0.5.7 — 2016-04-15
- 0.5.6 — 2016-04-15
- 0.5.5 — 2016-04-15
- 0.5.4 — 2016-04-15
- 0.5.3 — 2016-04-15
- 0.5.2 — 2016-04-15
- 0.5.1 — 2016-04-14
- 0.5.0 — 2016-04-14

## README

# encrypted-content-encoding-legacy

This is a backport of the [encrypted-content-encoding module](https://github.com/martinthomson/encrypted-content-encoding) for Node 0.10

======

# encrypted-content-encoding

A simple implementation of the [HTTP encrypted
content-encoding](https://tools.ietf.org/html/draft-nottingham-http-encryption-encoding)

# Use

```js
var ece = require('http_ece');
var crypto = require('crypto')
var base64 = require('base64url');

var parameters = {
  key: base64.encode(crypto.randomBytes(16)),
  salt: base64.encode(crypto.randomBytes(16))
};
var encrypted = ece.encrypt(data, parameters);

var decrypted = ece.encrypt(encrypted, parameters);

require('assert').equal(decrypted.compare(data), 0);
```

This also supports the static-ephemeral ECDH mode.  The source explains how.

# TODO

Use the node streams API instead of the legacy APIs.

---
_Source: https://npm.io/package/http_ece-legacy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
