cookie-encrypter
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -1,5 +0,5 @@ | ||
v0.2.2 / 2016-11-18 | ||
v0.2.3 / 2016-11-18 | ||
=================== | ||
* Update README and example for both cases (encrypted cookies and plain cookies) | ||
* Update README and add example for both cases (encrypted cookies and plain cookies) | ||
@@ -6,0 +6,0 @@ v0.2.0 / 2016-11-18 |
{ | ||
"name": "cookie-encrypter", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Transparently encrypt/decrypt your cookie with Nodejs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,2 +20,11 @@ # [cookie-encrypter](https://github.com/ebourmalo/cookie-encrypter) | ||
```js | ||
const express = require('express'); | ||
const cookieParser = require('cookie-parser'); | ||
const cookieEncrypter = require('./cook'); | ||
const app = express(); | ||
const secretKey = 'foobarbaz12345'; | ||
app.use(cookieParser(secretKey)); | ||
app.use(cookieEncrypter(secretKey)); | ||
app.get('/setcookies', function(req, res) { | ||
@@ -22,0 +31,0 @@ const cookieParams = { |
8453
76