Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LinkOTPSecretCode = LinkOTPSecretCodeType{}
View Source
var OOBOTPSecretCode = OOBOTPSecretCodeType{}
View Source
var RecoveryCode = RecoveryCodeType{}
Functions ¶
Types ¶
type LinkOTPSecretCodeType ¶
type LinkOTPSecretCodeType struct{}
func (LinkOTPSecretCodeType) CheckFormat ¶
func (LinkOTPSecretCodeType) CheckFormat(value interface{}) error
func (LinkOTPSecretCodeType) Compare ¶
func (LinkOTPSecretCodeType) Compare(a, b string) bool
func (LinkOTPSecretCodeType) Generate ¶
func (LinkOTPSecretCodeType) Generate() string
func (LinkOTPSecretCodeType) GenerateDeterministic ¶
func (LinkOTPSecretCodeType) GenerateDeterministic(data string) string
func (LinkOTPSecretCodeType) Length ¶
func (LinkOTPSecretCodeType) Length() int
type OOBOTPSecretCodeType ¶
type OOBOTPSecretCodeType struct{}
func (OOBOTPSecretCodeType) CheckFormat ¶
func (OOBOTPSecretCodeType) CheckFormat(value interface{}) error
func (OOBOTPSecretCodeType) Compare ¶
func (OOBOTPSecretCodeType) Compare(a, b string) bool
func (OOBOTPSecretCodeType) Generate ¶
func (OOBOTPSecretCodeType) Generate() string
func (OOBOTPSecretCodeType) GenerateFixed ¶
func (OOBOTPSecretCodeType) GenerateFixed(fixedCode string) string
func (OOBOTPSecretCodeType) Length ¶
func (OOBOTPSecretCodeType) Length() int
type QRCodeImageOptions ¶
type RecoveryCodeType ¶
type RecoveryCodeType struct{}
func (RecoveryCodeType) CheckFormat ¶
func (t RecoveryCodeType) CheckFormat(value interface{}) error
func (RecoveryCodeType) FormatForComparison ¶
func (RecoveryCodeType) FormatForComparison(code string) (formatted string, err error)
func (RecoveryCodeType) FormatForHuman ¶
func (RecoveryCodeType) FormatForHuman(code string) (formatted string)
func (RecoveryCodeType) Generate ¶
func (RecoveryCodeType) Generate() string
type TOTP ¶
type TOTP struct {
Secret string
}
func NewTOTPFromRNG ¶
NewTOTPSecretFromRNG generates random TOTP secret encoded in Base32 without Padding.
func NewTOTPFromSecret ¶
func (*TOTP) GenerateCode ¶
GenerateCode generates the TOTP code against the secret at the given time t.
func (*TOTP) QRCodeImage ¶
func (c *TOTP) QRCodeImage(opts QRCodeImageOptions) (image.Image, error)
type URIOptions ¶
Click to show internal directories.
Click to hide internal directories.