Permalink
Browse files

docs

  • Loading branch information...
1 parent d6127bf commit 91e44607217e9406238855b3fb3375e19efd6e50 @tj committed Oct 15, 2012
Showing with 15 additions and 2 deletions.
  1. +15 −2 Readme.md
View
@@ -1,13 +1,26 @@
# cookie-signature
- Sign and unsign cookies
+ 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
(The MIT License)
-Copyright (c) 2012 TJ Holowaychuk <tj@learnboost.com>
+Copyright (c) 2012 LearnBoost <tj@learnboost.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

0 comments on commit 91e4460

Please sign in to comment.