zotp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HOTP

type HOTP struct {
	OTP
	Counter int64
}

func (HOTP) Generate

func (hotp HOTP) Generate() (string, error)

type OTP

type OTP struct {
	Secret string
	Digits int
	Label  string
}

type OTPAlgorithm

type OTPAlgorithm int
const (
	SHA1 OTPAlgorithm = iota
	SHA256
	SHA512
)

type TOTP

type TOTP struct {
	OTP
	Issuer          string
	Algorithm       OTPAlgorithm
	Period          int
	CurrentUnixTime int64
}

func (TOTP) Generate

func (totp TOTP) Generate() (string, error)

Jump to

Keyboard shortcuts

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