Skip to content

Documents for @litert/otp / TOTP / IGenerator

Interface: IGenerator()

Defined in: TOTP.ts:54

Generator function type for TOTP codes.

IGenerator(time?): string

Defined in: TOTP.ts:76

Generator function type for TOTP codes.

Parameters

time?

number

The current time in milliseconds. [default: Date.now()]

Returns

string

Properties

digest

readonly digest: EDigest

Defined in: TOTP.ts:69

The digest algorithm used to generate the TOTP code.


digits

readonly digits: number

Defined in: TOTP.ts:59

The output width of OTP.


period

readonly period: number

Defined in: TOTP.ts:64

The code generation interval of TOTP, in second.