# @dneeraj123/http_ece

> Encrypted Content-Encoding for HTTP

Latest version **1.0.0** (published 2024-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dneeraj123/http_ece
pnpm add @dneeraj123/http_ece
yarn add @dneeraj123/http_ece
bun add @dneeraj123/http_ece
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-04-12 |
| First published | 2024-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 0 |
| Unpacked size | 17.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Neeraj |
| Maintainers | dneeraj123 |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2024-04-12

## README

# encrypted-content-encoding

This fork deals with base64 encoding issue of the buffer data.

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/@dneeraj123/http_ece · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
