Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCode ¶
func GenerateCode(secret string, counter uint64, options *OtpOptions) (string, error)
func ToggleDebug ¶
func ToggleDebug()
func ValidateCode ¶
Types ¶
type OtpKey ¶
type OtpKey struct {
// contains filtered or unexported fields
}
func GenerateKey ¶
func GenerateKey(algorithm string, opts *OtpKeyOptions) (*OtpKey, error)
type OtpKeyOptions ¶
type OtpKeyOptions struct { Issuer string UserId string Secret *OtpSecret Options *OtpOptions }
func NewDefaultOtpKeyOptions ¶
func NewDefaultOtpKeyOptions(issuer string, userId string) *OtpKeyOptions
type OtpOptions ¶
type OtpOptions struct { CodeSize common.PassCodeSize Algorithm common.Algorithm }
func NewDefaultOtpOptions ¶
func NewDefaultOtpOptions() *OtpOptions
Click to show internal directories.
Click to hide internal directories.