totp

package
v0.0.0-...-4f6dbb3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSecret

func ValidateSecret(secret string) error

Types

type TOTPInfo

type TOTPInfo struct {
	Code             uint32
	RemainingSeconds int64
}

TOTPInfo contains the generated code and its validity information

func GenerateCode

func GenerateCode(secret string) (TOTPInfo, error)

GenerateCode generates a TOTP code and returns it along with remaining validity time

Jump to

Keyboard shortcuts

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