0.0.1 • Published 2 months ago

mobilepass v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 months ago

mobilepass-js

This is a JavaScript implementation of the MobilePASS token client.

Usage

install

npm install mobilepass
pnpm add mobilepass
bun add mobilepass

code (ESModule)

import { generateOtp } from "mobilepass";

const actcode = "XUU75-RROTT-Y5IP6-U3BMV";
const counter = 1;

const otp = await generateOtp(actcode, counter);
console.log(`OTP: ${otp}`);

code (CommonJS)

const { generateOtp } = require("mobilepass");

const actcode = "XUU75-RROTT-Y5IP6-U3BMV";
const counter = 1;

(async () => {
  const otp = await generateOtp(actcode, counter);

  console.log(`OTP: ${otp}`);
})();

Compatibility

  • Node.js 15.0.0 and later
  • Any other JavaScript environment that supports WebCrypto API
0.0.1

2 months ago

0.0.0

3 months ago

0.0.0-alpha.1

3 months ago

0.0.0-alpha.0

3 months ago

0.0.0-development

3 months ago