Versions in this module Expand all Collapse all v1 v1.0.0 Aug 7, 2017 Changes in this version + func Generate(opts GenerateOpts) (*otp.Key, error) + func GenerateCode(secret string, t time.Time) (string, error) + func GenerateCodeCustom(secret string, t time.Time, opts ValidateOpts) (passcode string, err error) + func Validate(passcode string, secret string) bool + func ValidateCustom(passcode string, secret string, t time.Time, opts ValidateOpts) (bool, error) + type GenerateOpts struct + AccountName string + Algorithm otp.Algorithm + Digits otp.Digits + Issuer string + Period uint + SecretSize uint + type ValidateOpts struct + Algorithm otp.Algorithm + Digits otp.Digits + Period uint + Skew uint