Skip to content

jack-broadway/node-timednonce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timed Nonce

npm version npm downloads license

A small library for generating and verifying time based nonces using secrets.

Installation

npm install node-timednonce --save

Usage

var nonceHandler = require(node-timednonce);


var nonce = nonceHandler.create("secret", 100); //Returns the nonce ready to send
var valid = nonceHandler.verify("secret", nonce); //Will return true otherwise return object with status and message

Tests

$ npm test