hotp

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCode

func GenerateCode(secret string, counter uint64) (passcode string, err error)

func GenerateCodeCustom

func GenerateCodeCustom(secret string, counter uint64, opts ValidateOpts) (passcode string, err error)

func Validate

func Validate(passcode string, counter uint64, secret string) bool

func ValidateCodeCustom

func ValidateCodeCustom(passcode string, counter uint64, secret string, opts ValidateOpts) (result bool, err error)

Types

type ValidateOpts

type ValidateOpts struct {
	Digits    gotp.Digits
	Algorithm gotp.Algorithm
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL