Skip to content

Mighty683/hotp

Repository files navigation

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",
});

About

Typescript implementation of OCRA,HOTP,TOTP algorithms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published