# http_ece

> Encrypted Content-Encoding for HTTP

Latest version **1.2.1** (published 2024-08-08) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2024-08-08 |
| First published | 2015-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 0 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Martin Thomson |
| Maintainers | martinthomson |

## Links

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

## Recent versions

- 1.2.1 (latest) — 2024-08-08
- 1.2.0 — 2024-01-16
- 1.1.0 — 2019-02-11
- 1.0.5 — 2017-10-02
- 1.0.4 — 2017-07-04
- 1.0.2 — 2017-06-22
- 1.0.0 — 2017-05-08
- 0.7.2 — 2017-03-17
- 0.7.1 — 2017-03-12
- 0.7.0 — 2017-02-14
- 0.6.4 — 2016-12-23
- 0.6.3 — 2016-12-23
- 0.6.0 — 2016-12-22
- 0.5.2 — 2016-10-11
- 0.5.1 — 2016-04-22
- … 7 more at https://npm.io/package/http_ece/versions

## README

# encrypted-content-encoding

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

# Use

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

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

var decrypted = ece.decrypt(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 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
