# koa-cookie-cipher-middleware

> a nodejs cookie cipher using openssl aes192 algorithm

Latest version **1.0.0** (published 2017-02-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install koa-cookie-cipher-middleware
pnpm add koa-cookie-cipher-middleware
yarn add koa-cookie-cipher-middleware
bun add koa-cookie-cipher-middleware
```

## 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 | 2017-02-15 |
| First published | 2017-02-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | slashhuang |
| Maintainers | slashhuang |
| Keywords | koa, gzip, middleware |

## Links

- npm: https://www.npmjs.com/package/koa-cookie-cipher-middleware
- Repository: https://github.com/slashhuang/cookie-cipher
- Homepage: https://github.com/slashhuang/cookie-cipher#readme
- Issues: https://github.com/slashhuang/cookie-cipher/issues
- npm.io page: https://npm.io/package/koa-cookie-cipher-middleware

## Dependencies (1)

- [koa](https://npm.io/package/koa.md) ^2.0.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-02-15

## README

# koa-cookie-cipher-middleware

> simple cookie cipher middleware for koa2.

## Installation

```bash
    npm install koa-cookie-cipher-middleware
```

## Usage
```javascript

    const app = new Koa();
    const Cipher = require('koa-cookie-cipher-middleware');
    const PORT = 3000;
    const TestMiddleware = async function(ctx,next) {
        console.log(`cipher name  slashhuang\n`);
        let cookieCipher = await ctx.cookie_decoder.cipher('slashhuang')
        console.log(`cipher slashhuang to ${cookieCipher}\n`);
        let cookieDecipher = await ctx.cookie_decoder.decipher('slashhuang');
        console.log(`decipher cookie ${cookieCipher} to ${cookieDecipher}`);
    }
    const MiddlewareArr = [ Cipher('hello'),TestMiddleware ];
    app.use(Compose(MiddlewareArr));
    app.listen(PORT);

```

## demo page
![cipher demo]( ./assets/cipher.png)

## Author
slashhuang

##License
MIT

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