19 Commits

Author SHA1 Message Date
AJ ONeal
639bffbd8b browser fork 2015-10-22 21:22:21 -07:00
Guy Halford-Thompson
bbdf82a34e Merge pull request #32 from coolaj86/patch-4
lint fix: move functions above usage
2015-10-07 20:00:52 -07:00
AJ ONeal
e9d003f541 lint fix: move functions above usage
just moving the helper functions so jslint and similar don't complain.
2015-10-07 11:08:13 -07:00
AJ ONeal
483310097e add 'use strict';
There are no strict violations in this code, so it makes sense to let people who are examining the code know right up front that this code already meets many of the most important code quality standards and that no changes that decrease the code quality should be made.
2015-10-07 11:05:12 -07:00
AJ ONeal
eb1d1a5f0e use Date.now() instead of new Date().getTime()
For more idiomatic JavaScript.
2015-10-06 14:46:49 -07:00
Egor Homakov
1ca7eb1739 Fix bug when v is < 1000000 and substr fails
For v less 1m e.g. 12345 previous code would try to get substr(-1,6). This happens once in 2130 attempts.
2015-08-05 22:41:47 +03:00
Tony Lukasavage
39d027fd0b remove unnecessary semicolon 2015-05-05 15:53:56 -04:00
Simon DENEL
14a4fdf7fd Update index.js
A little optimization trick: hex.length will not change, so we can avoid to evaluate it each time we loop.
2015-04-11 15:42:28 +02:00
Aaron Dufour
a653c7e624 default opt to {} where appropriate 2014-09-12 16:08:20 -04:00
Martin Vonheim Larsen
22e48620d1 Fixed issue with hash algorithm using Browserify
Fixes #14.
2014-08-23 12:32:08 +02:00
Fazli Sapuan
0154ab839b Make verify() follow the specs and return null 2014-06-09 13:58:19 +08:00
Guy Halford-Thompson
d10c328292 Merge pull request #9 from freewil/throw-time-overwrite
throw if trying to overwrite time in non-test env
2014-04-09 09:08:57 -07:00
freewil
f53ba3822c throw if trying to overwrite time in non-test env 2014-04-07 04:15:49 -07:00
Joël Franusic
e977ceaa68 minor documentation changes 2013-03-27 17:23:07 -07:00
Guy Halford-Thompson
13865d89d5 Fixed issue causing negative counter values to be rejected 2012-06-13 17:38:47 +00:00
Roman Shtylman
cfa2ecddb1 rework api
make two subobjects `hotp` and `totp` with gen and verify methods
2012-06-01 00:33:55 -04:00
Roman Shtylman
9344bad009 rename arguments
There is no need for single letter arguments, they just make reading the
code more confusing. The spec uses them to avoid typing longer words all
over the place but we don't have as much code to produce.

- P -> token
- W -> window
- K -> key
- C -> counter
- T -> time
2012-06-01 00:04:21 -04:00
Roman Shtylman
3fd84e5a7e rename lib/nopt.js -> index.js
simple project don't need lib folder
2012-05-31 23:51:19 -04:00
Guy Halford-Thompson
dac00027c4 Commit for version 1.1.2 2011-10-02 18:08:30 -07:00