hotp

package
v0.0.0-...-1caaf2b Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAuthQR

func GenerateAuthQR(auth Auth, w io.Writer) error

func GenerateQR

func GenerateQR(message string, w io.Writer) error

GenerateAQR from string message

func GenerateURL

func GenerateURL(auth Auth) string

func GetHOTPToken

func GetHOTPToken(auth Auth, interval int64) (string, error)

GetHOTPToken return a token using the RFC 4226 system Interval is int64 seconds

func GetTOTPToken

func GetTOTPToken(auth Auth) (string, error)

GetTOTPToken return a token using the RFC 4226 system and interval usint the unix time from the server

Types

type Auth

type Auth struct {
	Label  string
	User   string
	Key    string
	Digits int
	Period int64
}

Jump to

Keyboard shortcuts

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