1 |
|
2 | # cookie-signature
|
3 |
|
4 | Sign and unsign cookies.
|
5 |
|
6 | ## Example
|
7 |
|
8 | ```js
|
9 | var cookie = require('cookie-signature');
|
10 |
|
11 | var val = cookie.sign('hello', 'tobiiscool');
|
12 | val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
|
13 |
|
14 | var val = cookie.sign('hello', 'tobiiscool');
|
15 | cookie.unsign(val, 'tobiiscool').should.equal('hello');
|
16 | cookie.unsign(val, 'luna').should.be.false;
|
17 | ```
|
18 |
|
19 | ## License
|
20 |
|
21 | MIT.
|
22 |
|
23 | See LICENSE file for details.
|