otp

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoTotpEntry signals a failed OTP for a secret with OTP information
	ErrNoTotpEntry = fmt.Errorf("no totp entry in secret")
)

Functions

func Calculate

func Calculate(ctx context.Context, name string, sec store.Secret) (twofactor.OTP, string, error)

Calculate will compute a OTP code from a given secret

func WriteQRFile

func WriteQRFile(ctx context.Context, otp twofactor.OTP, label, file string) error

WriteQRFile writes the given OTP code as a QR image to disk

Types

This section is empty.

Jump to

Keyboard shortcuts

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