Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tj/node-cookie-signature
cookie signing
https://github.com/tj/node-cookie-signature
Last synced: 4 days ago
JSON representation
cookie signing
- Host: GitHub
- URL: https://github.com/tj/node-cookie-signature
- Owner: tj
- License: mit
- Created: 2012-10-15T15:54:33.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T19:38:26.000Z (3 months ago)
- Last Synced: 2025-01-13T00:04:53.078Z (6 days ago)
- Language: JavaScript
- Size: 48.8 KB
- Stars: 189
- Watchers: 7
- Forks: 36
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - node-cookie-signature
README
# cookie-signature
Sign and unsign cookies.
## Example
```js
var cookie = require('cookie-signature');var val = cookie.sign('hello', 'tobiiscool');
val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');var val = cookie.sign('hello', 'tobiiscool');
cookie.unsign(val, 'tobiiscool').should.equal('hello');
cookie.unsign(val, 'luna').should.be.false;
```## License
MIT.
See LICENSE file for details.