source: trip-planner-front/node_modules/cookie-signature/Readme.md@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.5 KB
Line 
1
2# cookie-signature
3
4 Sign and unsign cookies.
5
6## Example
7
8```js
9var cookie = require('cookie-signature');
10
11var val = cookie.sign('hello', 'tobiiscool');
12val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
13
14var val = cookie.sign('hello', 'tobiiscool');
15cookie.unsign(val, 'tobiiscool').should.equal('hello');
16cookie.unsign(val, 'luna').should.be.false;
17```
18
19## License
20
21(The MIT License)
22
23Copyright (c) 2012 LearnBoost &lt;tj@learnboost.com&gt;
24
25Permission is hereby granted, free of charge, to any person obtaining
26a copy of this software and associated documentation files (the
27'Software'), to deal in the Software without restriction, including
28without limitation the rights to use, copy, modify, merge, publish,
29distribute, sublicense, and/or sell copies of the Software, and to
30permit persons to whom the Software is furnished to do so, subject to
31the following conditions:
32
33The above copyright notice and this permission notice shall be
34included in all copies or substantial portions of the Software.
35
36THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
37EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
39IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
40CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
41TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
42SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note: See TracBrowser for help on using the repository browser.