diff --git a/README.md b/README.md index 0ace47c..c518735 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ HMAC-Based One-Time Password (HOTP), and Time-Based One-Time Password (TOTP) Alg $ npm install --save hotp ``` +## Changelog + +- **v3.0.0**: Removed CLI utilities – now to be found at [jhermsmeier / hotp-totp-cli](https://github.com/jhermsmeier/hotp-totp-cli) +- **v2.0.0**: Added TOTP implementation +- **v1.0.0**: Initial release + ## Usage ### HOTP @@ -62,16 +68,6 @@ var token = hotp.totp( key, { digits: 8 }) console.log( token ) // > '86247382' ``` -## CLI Usage - -```console -hotp [digits=6] -``` - -```console -totp [digits=6] -``` - ## References - [RFC 4226, HOTP: An HMAC-Based One-Time Password Algorithm](https://tools.ietf.org/html/rfc4226) diff --git a/bin/hotp b/bin/hotp deleted file mode 100755 index d1432c6..0000000 --- a/bin/hotp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node -var hotp = require( '..' ) -var argv = process.argv.slice( 2 ) - -var key = argv.shift() -var counter = argv.shift() -var digits = argv.shift() - -if( !key || !counter ) { - console.error( `Usage: hotp [digits=6]` ) - process.exit( 1 ) -} - -var options = { - digits: digits ? +digits : undefined, -} - -console.log( hotp( key, counter, options ) ) diff --git a/bin/totp b/bin/totp deleted file mode 100755 index ab86a2c..0000000 --- a/bin/totp +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node -var hotp = require( '..' ) -var argv = process.argv.slice( 2 ) - -var key = argv.shift() -var digits = argv.shift() - -if( !key ) { - console.error( `Usage: totp [digits=6]` ) - process.exit( 1 ) -} - -var options = { - digits: digits ? +digits : undefined, -} - -console.log( hotp.totp( key, options ) ) diff --git a/package.json b/package.json index a5c51c2..3136d12 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,6 @@ "time-based" ], "main": "lib/hotp", - "bin": { - "hotp": "bin/hotp", - "totp": "bin/totp" - }, "scripts": { "test": "mocha" },