otp

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOathOTP is returned when the secret is not a valid OATH secret.
	ErrOathOTP = fmt.Errorf("QR codes can only be generated for OATH OTPs")
	// ErrType is returned when the secret is not a valid OTP type.
	ErrType = fmt.Errorf("type assertion failed")
)

Functions

func Calculate

func Calculate(name string, sec gopass.Secret) (twofactor.OTP, string, error)

Calculate will compute a OTP code from a given secret.

func WriteQRFile

func WriteQRFile(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