url-hash
Node library to add hash parameter for tamper-free urls
Basic Usage
Add hash to url
// require libraryvar urlHash = ; var url = 'http://www.example.com/page?id=4'; // add hash to urlvar newUrl = urlHash;
Verify Url
// require libraryvar urlHash = ; // check integrity of urlvar result = urlHash; /* result will either: 1. equal true if the url is unchanged 2. equal false if the url has been changed */
Configuration options
This library currently offers the following configuration options:
- salt
- expire
- hash key name
urlHash;