hotp-ts
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

HOTP-TS

Typescript implementation of:

Works both in node and browser environment.

Usage

Install:

npm install hotp-ts

HOTP

import { generateHOTP } from "hotp-ts";

let hotp = await generateHOTP("some-secret-to-share-with-server", 0);

TOTP

import { generateTOTP } from "hotp-ts";

let totp = await generateTOTP("some-secret-to-share-with-server", {
  timestamp: Date.now(),
});

OCRA

import { generateOCRA } from "hotp-ts";

let ocraResponse = await generateOCRA("secret", {
  suite: "OCRA-1:HOTP-SHA256-8:QN08-PSHA1",
  question: "00000000",
  passwordHash: "7110eda4d09e062aa5e4a390b0a572ac0d2c0220",
});

Readme

Keywords

Package Sidebar

Install

npm i hotp-ts

Weekly Downloads

2

Version

2.0.3

License

MIT

Unpacked Size

61.4 kB

Total Files

31

Last publish

Collaborators

  • migum