otp

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: MIT Imports: 9 Imported by: 21

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) (*otp.Key, error)

Calculate will compute a OTP code from a given secret.

func WriteQRFile

func WriteQRFile(key *otp.Key, 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