Skip to content

Commit

Permalink
9.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Oct 16, 2022
1 parent 39f0066 commit 4c9ac91
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 74 deletions.
11 changes: 5 additions & 6 deletions dist/otpauth.esm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="./otpauth.d.ts" />
/**
* Converts an integer to an ArrayBuffer.
* @param {number} num Integer.
Expand All @@ -17,8 +18,8 @@ const uintToBuf = num => {
};

const createHmac = undefined;
const randomBytes$1 = undefined;
const timingSafeEqual$1 = undefined;
const randomBytes$1 = undefined;
const timingSafeEqual$1 = undefined;

var crypto = /*#__PURE__*/Object.freeze({
__proto__: null,
Expand Down Expand Up @@ -753,7 +754,6 @@ class rt {
* @type {Object.<string, *>}
*/
const globalScope = (() => {
// @ts-ignore
if (typeof globalThis === "object") return globalThis;else {
Object.defineProperty(Object.prototype, "__GLOBALTHIS__", {
get() {
Expand All @@ -778,7 +778,7 @@ const globalScope = (() => {

/**
* OpenSSL to jsSHA algorithms map.
* @type {Object.<string, string>}
* @type {Object.<string, "SHA-1"|"SHA-224"|"SHA-256"|"SHA-384"|"SHA-512"|"SHA3-224"|"SHA3-256"|"SHA3-384"|"SHA3-512">}
*/
const OPENSSL_JSSHA_ALGO_MAP = {
SHA1: "SHA-1",
Expand Down Expand Up @@ -810,7 +810,6 @@ const hmacDigest = (algorithm, key, message) => {
if (typeof variant === "undefined") {
throw new TypeError("Unknown hash function");
}
// @ts-ignore
const hmac = new rt(variant, "ARRAYBUFFER");
hmac.setHMACKey(key, "ARRAYBUFFER");
hmac.update(message);
Expand Down Expand Up @@ -1665,6 +1664,6 @@ class URI {
* Library version.
* @type {string}
*/
const version = "9.0.0";
const version = "9.0.1";

export { HOTP, Secret, TOTP, URI, version };
3 changes: 2 additions & 1 deletion 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.

7 changes: 3 additions & 4 deletions dist/otpauth.node.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="./otpauth.d.ts" />
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });
Expand Down Expand Up @@ -50,7 +51,6 @@ var jsSHA = undefined;
* @type {Object.<string, *>}
*/
const globalScope = (() => {
// @ts-ignore
if (typeof globalThis === "object") return globalThis;else {
Object.defineProperty(Object.prototype, "__GLOBALTHIS__", {
get() {
Expand All @@ -75,7 +75,7 @@ const globalScope = (() => {

/**
* OpenSSL to jsSHA algorithms map.
* @type {Object.<string, string>}
* @type {Object.<string, "SHA-1"|"SHA-224"|"SHA-256"|"SHA-384"|"SHA-512"|"SHA3-224"|"SHA3-256"|"SHA3-384"|"SHA3-512">}
*/
const OPENSSL_JSSHA_ALGO_MAP = {
SHA1: "SHA-1",
Expand Down Expand Up @@ -107,7 +107,6 @@ const hmacDigest = (algorithm, key, message) => {
if (typeof variant === "undefined") {
throw new TypeError("Unknown hash function");
}
// @ts-ignore
const hmac = new jsSHA(variant, "ARRAYBUFFER");
hmac.setHMACKey(key, "ARRAYBUFFER");
hmac.update(message);
Expand Down Expand Up @@ -962,7 +961,7 @@ class URI {
* Library version.
* @type {string}
*/
const version = "9.0.0";
const version = "9.0.1";

exports.HOTP = HOTP;
exports.Secret = Secret;
Expand Down
3 changes: 2 additions & 1 deletion dist/otpauth.node.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/otpauth.node.min.cjs.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/otpauth.node.min.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/otpauth.node.min.mjs.map

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/otpauth.node.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="./otpauth.d.ts" />
import * as crypto from 'node:crypto';

/**
Expand Down Expand Up @@ -26,7 +27,6 @@ var jsSHA = undefined;
* @type {Object.<string, *>}
*/
const globalScope = (() => {
// @ts-ignore
if (typeof globalThis === "object") return globalThis;else {
Object.defineProperty(Object.prototype, "__GLOBALTHIS__", {
get() {
Expand All @@ -51,7 +51,7 @@ const globalScope = (() => {

/**
* OpenSSL to jsSHA algorithms map.
* @type {Object.<string, string>}
* @type {Object.<string, "SHA-1"|"SHA-224"|"SHA-256"|"SHA-384"|"SHA-512"|"SHA3-224"|"SHA3-256"|"SHA3-384"|"SHA3-512">}
*/
const OPENSSL_JSSHA_ALGO_MAP = {
SHA1: "SHA-1",
Expand Down Expand Up @@ -83,7 +83,6 @@ const hmacDigest = (algorithm, key, message) => {
if (typeof variant === "undefined") {
throw new TypeError("Unknown hash function");
}
// @ts-ignore
const hmac = new jsSHA(variant, "ARRAYBUFFER");
hmac.setHMACKey(key, "ARRAYBUFFER");
hmac.update(message);
Expand Down Expand Up @@ -938,6 +937,6 @@ class URI {
* Library version.
* @type {string}
*/
const version = "9.0.0";
const version = "9.0.1";

export { HOTP, Secret, TOTP, URI, version };
11 changes: 5 additions & 6 deletions dist/otpauth.umd.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="./otpauth.d.ts" />
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
Expand All @@ -23,8 +24,8 @@
};

const createHmac = undefined;
const randomBytes$1 = undefined;
const timingSafeEqual$1 = undefined;
const randomBytes$1 = undefined;
const timingSafeEqual$1 = undefined;

var crypto = /*#__PURE__*/Object.freeze({
__proto__: null,
Expand Down Expand Up @@ -759,7 +760,6 @@
* @type {Object.<string, *>}
*/
const globalScope = (() => {
// @ts-ignore
if (typeof globalThis === "object") return globalThis;else {
Object.defineProperty(Object.prototype, "__GLOBALTHIS__", {
get() {
Expand All @@ -784,7 +784,7 @@

/**
* OpenSSL to jsSHA algorithms map.
* @type {Object.<string, string>}
* @type {Object.<string, "SHA-1"|"SHA-224"|"SHA-256"|"SHA-384"|"SHA-512"|"SHA3-224"|"SHA3-256"|"SHA3-384"|"SHA3-512">}
*/
const OPENSSL_JSSHA_ALGO_MAP = {
SHA1: "SHA-1",
Expand Down Expand Up @@ -816,7 +816,6 @@
if (typeof variant === "undefined") {
throw new TypeError("Unknown hash function");
}
// @ts-ignore
const hmac = new rt(variant, "ARRAYBUFFER");
hmac.setHMACKey(key, "ARRAYBUFFER");
hmac.update(message);
Expand Down Expand Up @@ -1671,7 +1670,7 @@
* Library version.
* @type {string}
*/
const version = "9.0.0";
const version = "9.0.1";

exports.HOTP = HOTP;
exports.Secret = Secret;
Expand Down
3 changes: 2 additions & 1 deletion dist/otpauth.umd.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions docs/classes/HOTP.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">HOTP</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L11">hotp.js:11</a></li></ul></aside>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L11">hotp.js:11</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -97,7 +97,7 @@ <h5>secret<span class="tsd-signature-symbol">: </span><span class="tsd-signature
</div></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="HOTP.html" class="tsd-signature-type" data-tsd-kind="Class">HOTP</a></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L44">hotp.js:44</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L44">hotp.js:44</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="algorithm" class="tsd-anchor"></a>
Expand All @@ -106,42 +106,42 @@ <h3 class="tsd-anchor-link"><span>algorithm</span><a href="#algorithm" aria-labe
<div class="tsd-comment tsd-typography"><p>HMAC hashing algorithm.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L72">hotp.js:72</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L72">hotp.js:72</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="counter" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>counter</span><a href="#counter" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">counter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Initial counter value.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L82">hotp.js:82</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L82">hotp.js:82</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="digits" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>digits</span><a href="#digits" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">digits<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<div class="tsd-comment tsd-typography"><p>Token length.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L77">hotp.js:77</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L77">hotp.js:77</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="issuer" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>issuer</span><a href="#issuer" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">issuer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<div class="tsd-comment tsd-typography"><p>Account provider.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L56">hotp.js:56</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L56">hotp.js:56</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="label" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>label</span><a href="#label" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">label<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<div class="tsd-comment tsd-typography"><p>Account label.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L61">hotp.js:61</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L61">hotp.js:61</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="secret" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>secret</span><a href="#secret" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">secret<span class="tsd-signature-symbol">:</span> <a href="Secret.html" class="tsd-signature-type" data-tsd-kind="Class">Secret</a></div>
<div class="tsd-comment tsd-typography"><p>Secret key.</p>
</div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L66">hotp.js:66</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L66">hotp.js:66</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="defaults" class="tsd-anchor"></a>
Expand All @@ -166,7 +166,7 @@ <h5>label<span class="tsd-signature-symbol">: </span><span class="tsd-signature-
<li class="tsd-parameter">
<h5>window<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L23">hotp.js:23</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L23">hotp.js:23</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generate" class="tsd-anchor"></a>
Expand All @@ -192,7 +192,7 @@ <h5>counter<span class="tsd-signature-symbol">: </span><span class="tsd-signatur
</div></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L120">hotp.js:120</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L120">hotp.js:120</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="toString" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand All @@ -204,7 +204,7 @@ <h3>Returns</h3><p>URI.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L192">hotp.js:192</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L192">hotp.js:192</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="validate" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>validate</span><a href="#validate" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand Down Expand Up @@ -236,7 +236,7 @@ <h5>window<span class="tsd-signature-symbol">: </span><span class="tsd-signature
</div></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L177">hotp.js:177</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L177">hotp.js:177</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generate-2" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>generate</span><a href="#generate-2" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand Down Expand Up @@ -272,7 +272,7 @@ <h5>secret<span class="tsd-signature-symbol">: </span><a href="Secret.html" clas
</div></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L94">hotp.js:94</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L94">hotp.js:94</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="validate-2" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>validate</span><a href="#validate-2" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand Down Expand Up @@ -316,7 +316,7 @@ <h5>window<span class="tsd-signature-symbol">: </span><span class="tsd-signature
</div></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/44566d0/src/hotp.js#L140">hotp.js:140</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/hectorm/otpauth/blob/39f0066/src/hotp.js#L140">hotp.js:140</a></li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
Loading

0 comments on commit 4c9ac91

Please sign in to comment.