Skip to content

Commit

Permalink
9.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Sep 28, 2024
1 parent dd589c4 commit 58f712b
Show file tree
Hide file tree
Showing 27 changed files with 119 additions and 119 deletions.
8 changes: 4 additions & 4 deletions dist/otpauth.d.cts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ declare class HOTP {
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.counter=0] Counter value.
* @param {number} [config.window=1] Window of counter values to test.
* @returns {number|null} Token delta or null if it is not found in the search window, in which case it should be considered invalid.
Expand All @@ -126,7 +126,7 @@ declare class HOTP {
token: string;
secret: Secret;
algorithm?: string | undefined;
digits: number;
digits?: number | undefined;
counter?: number | undefined;
window?: number | undefined;
}): number | null;
Expand Down Expand Up @@ -263,7 +263,7 @@ declare class TOTP {
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.period=30] Token time-step duration.
* @param {number} [config.timestamp=Date.now] Timestamp value in milliseconds.
* @param {number} [config.window=1] Window of counter values to test.
Expand All @@ -273,7 +273,7 @@ declare class TOTP {
token: string;
secret: Secret;
algorithm?: string | undefined;
digits: number;
digits?: number | undefined;
period?: number | undefined;
timestamp?: number | undefined;
window?: number | undefined;
Expand Down
8 changes: 4 additions & 4 deletions dist/otpauth.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ declare class HOTP {
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.counter=0] Counter value.
* @param {number} [config.window=1] Window of counter values to test.
* @returns {number|null} Token delta or null if it is not found in the search window, in which case it should be considered invalid.
Expand All @@ -126,7 +126,7 @@ declare class HOTP {
token: string;
secret: Secret;
algorithm?: string | undefined;
digits: number;
digits?: number | undefined;
counter?: number | undefined;
window?: number | undefined;
}): number | null;
Expand Down Expand Up @@ -263,7 +263,7 @@ declare class TOTP {
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.period=30] Token time-step duration.
* @param {number} [config.timestamp=Date.now] Timestamp value in milliseconds.
* @param {number} [config.window=1] Window of counter values to test.
Expand All @@ -273,7 +273,7 @@ declare class TOTP {
token: string;
secret: Secret;
algorithm?: string | undefined;
digits: number;
digits?: number | undefined;
period?: number | undefined;
timestamp?: number | undefined;
window?: number | undefined;
Expand Down
10 changes: 5 additions & 5 deletions dist/otpauth.esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! otpauth 9.3.3 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! otpauth 9.3.4 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! noble-hashes 1.5.0 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
/// <reference types="./otpauth.d.ts" />
// @ts-nocheck
Expand Down Expand Up @@ -1508,11 +1508,11 @@ const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.counter=0] Counter value.
* @param {number} [config.window=1] Window of counter values to test.
* @returns {number|null} Token delta or null if it is not found in the search window, in which case it should be considered invalid.
*/ static validate({ token, secret, algorithm, digits, counter = HOTP.defaults.counter, window = HOTP.defaults.window }) {
*/ static validate({ token, secret, algorithm, digits = HOTP.defaults.digits, counter = HOTP.defaults.counter, window = HOTP.defaults.window }) {
// Return early if the token length does not match the digit number.
if (token.length !== digits) return null;
let delta = null;
Expand Down Expand Up @@ -1665,7 +1665,7 @@ const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.period=30] Token time-step duration.
* @param {number} [config.timestamp=Date.now] Timestamp value in milliseconds.
* @param {number} [config.window=1] Window of counter values to test.
Expand Down Expand Up @@ -1877,6 +1877,6 @@ const sha3_512 = /* @__PURE__ */ gen(0x06, 72, 512 / 8);
/**
* Library version.
* @type {string}
*/ const version = "9.3.3";
*/ const version = "9.3.4";

export { HOTP, Secret, TOTP, URI, version };
8 changes: 4 additions & 4 deletions dist/otpauth.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/otpauth.esm.min.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/otpauth.node.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! otpauth 9.3.3 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! otpauth 9.3.4 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
/// <reference types="./otpauth.d.ts" />
// @ts-nocheck
'use strict';
Expand Down Expand Up @@ -433,11 +433,11 @@ var crypto__namespace = /*#__PURE__*/_interopNamespaceDefault(crypto);
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.counter=0] Counter value.
* @param {number} [config.window=1] Window of counter values to test.
* @returns {number|null} Token delta or null if it is not found in the search window, in which case it should be considered invalid.
*/ static validate({ token, secret, algorithm, digits, counter = HOTP.defaults.counter, window = HOTP.defaults.window }) {
*/ static validate({ token, secret, algorithm, digits = HOTP.defaults.digits, counter = HOTP.defaults.counter, window = HOTP.defaults.window }) {
// Return early if the token length does not match the digit number.
if (token.length !== digits) return null;
let delta = null;
Expand Down Expand Up @@ -590,7 +590,7 @@ var crypto__namespace = /*#__PURE__*/_interopNamespaceDefault(crypto);
* @param {string} config.token Token value.
* @param {Secret} config.secret Secret key.
* @param {string} [config.algorithm='SHA1'] HMAC hashing algorithm.
* @param {number} config.digits Token length.
* @param {number} [config.digits=6] Token length.
* @param {number} [config.period=30] Token time-step duration.
* @param {number} [config.timestamp=Date.now] Timestamp value in milliseconds.
* @param {number} [config.window=1] Window of counter values to test.
Expand Down Expand Up @@ -802,7 +802,7 @@ var crypto__namespace = /*#__PURE__*/_interopNamespaceDefault(crypto);
/**
* Library version.
* @type {string}
*/ const version = "9.3.3";
*/ const version = "9.3.4";

exports.HOTP = HOTP;
exports.Secret = Secret;
Expand Down
Loading

0 comments on commit 58f712b

Please sign in to comment.