Skip to main content
Home

HOTP & TOTP & Steam Guard TOTP

This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
58%
Published
a year ago (0.1.2)

totp-wasm

HOTP(RFC 4226) & TOTP(RFC 6238) & Steam Guard TOTP

Demo

https://totp-wasm.vercel.app

Usage

Deno

import {
  totp,
  init,
  wasm_data,
} from 'https://deno.land/x/totp_wasm/deno/mod.ts'

await init(wasm_data)
const code = totp('GM4VC2CQN5UGS33ZJJVWYUSFMQ4HOQJW', 1662681600, 6, 30)
console.log(code)
// 473526

License

Code is distributed under MIT license, feel free to use it in your proprietary projects as well.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@gizmo-ds/totp-wasm

Import symbol

import * as totp_wasm from "@gizmo-ds/totp-wasm";
or

Import directly with a jsr specifier

import * as totp_wasm from "jsr:@gizmo-ds/totp-wasm";

Add Package

pnpm i jsr:@gizmo-ds/totp-wasm
or (using pnpm 10.8 or older)
pnpm dlx jsr add @gizmo-ds/totp-wasm

Import symbol

import * as totp_wasm from "@gizmo-ds/totp-wasm";

Add Package

yarn add jsr:@gizmo-ds/totp-wasm
or (using Yarn 4.8 or older)
yarn dlx jsr add @gizmo-ds/totp-wasm

Import symbol

import * as totp_wasm from "@gizmo-ds/totp-wasm";

Add Package

vlt install jsr:@gizmo-ds/totp-wasm

Import symbol

import * as totp_wasm from "@gizmo-ds/totp-wasm";

Add Package

npx jsr add @gizmo-ds/totp-wasm

Import symbol

import * as totp_wasm from "@gizmo-ds/totp-wasm";

Add Package

bunx jsr add @gizmo-ds/totp-wasm

Import symbol

import * as totp_wasm from "@gizmo-ds/totp-wasm";