totp

package
v0.0.0-...-b6677e2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TOTP

type TOTP struct {
	Secret      []byte
	Algorithm   string
	Digits      int
	Period      int
	Issuer      string
	AccountName string
}

func ParseFromURI

func ParseFromURI(uri string) (*TOTP, error)

func (*TOTP) Generate

func (t *TOTP) Generate() (string, error)

func (*TOTP) URI

func (t *TOTP) URI() string

URI formats the TOTP object as specified in https://github.com/google/google-authenticator/wiki/Key-Uri-Format

func (*TOTP) Verify

func (t *TOTP) Verify(code string) (valid bool, err error)

Jump to

Keyboard shortcuts

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