Versions in this module Expand all Collapse all v1 v1.1.0 Jul 10, 2021 Changes in this version type OTPConfig + func (otp *OTPConfig) GC() v1.0.0 Jul 9, 2021 Changes in this version + var ErrInvalidChallenge = errors.New("invalid secret") + var ErrInvalidCode = errors.New("invalid code") + var ErrInvalidSecret = errors.New("invalid secret") + func ComputeCode(secret string, challenge int64) (code string, err error) + func NewScratchCode() int + type OTPConfig struct + ScratchCodes []int + Secret string + UsedCodes []int + WindowSize int + func Load(b bytes.Buffer) (otp *OTPConfig, err error) + func New(scratchCodes int) *OTPConfig + func (otp *OTPConfig) Authenticate(password string) (bool, error) + func (otp *OTPConfig) ProvisionURI(user string, issuer string) string + func (otp *OTPConfig) Save() (b bytes.Buffer, err error)