Documentation ¶
Index ¶
Constants ¶
View Source
const ( // 30 second interval DefaultInterval = 30 OtpAuthScheme = "otpauth" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthURL ¶
type HOTP ¶
type HOTP struct {
// contains filtered or unexported fields
}
func (*HOTP) GenerateCode ¶
type OTP ¶
type OTP interface { Counter() Counter Hash() crypto.Hash GenerateCode(key string, count int64, tokenLen int) (string, error) VerifyCode(code, key string, skew, tokenLen int) bool }
func DefaultTOTP ¶
func DefaultTOTP() OTP
type TimeCounter ¶
type TimeCounter struct {
Interval, Step int
}
func (*TimeCounter) Count ¶
func (t *TimeCounter) Count() int64
Click to show internal directories.
Click to hide internal directories.