Versions in this module Expand all Collapse all v2 v2.0.1 Nov 28, 2023 v2.0.0 Nov 4, 2023 Changes in this version + const DefaultTimeStep + const HMACMinimumKeySize + var ErrAuthRequired = Error + var ErrChallengeRequired = errors.New("challenge required") + var ErrGeneric = Error + var ErrMultipleMatches = errors.New("multiple matches found") + var ErrNameTooLong = errors.New("name too long)") + var ErrNoSpace = Error + var ErrNoSuchObject = Error + var ErrNoValuesFound = errors.New("no values found in response") + var ErrResponseDoesNotMatch = Error + var ErrTouchCallbackRequired = errors.New("touch callback required") + var ErrTouchRequired = errors.New("touch required") + var ErrUnknownName = errors.New("no such name configured") + var ErrWrongSyntax = Error + type Algorithm byte + const HmacSha1 + const HmacSha256 + const HmacSha512 + func (a Algorithm) Hash() func() hash.Hash + func (a Algorithm) String() string + type Card struct + Clock func() time.Time + Rand io.Reader + Timestep time.Duration + func NewCard(pcscCard iso.PCSCCard) (*Card, error) + func (c *Card) Calculate(name string) (string, error) + func (c *Card) CalculateChallengeResponse(name string, challenge []byte) ([]byte, int, error) + func (c *Card) CalculateMatch(name string, touchRequiredCallback func(string) error) (string, error) + func (c *Card) Close() error + func (c *Card) Delete(name string) error + func (c *Card) List() ([]*Name, error) + func (c *Card) Put(name string, alg Algorithm, typ Type, digits int, key []byte, touch bool, ...) error + func (c *Card) RemoveCode() error + func (c *Card) Reset() error + func (c *Card) Select() (*Select, error) + func (c *Card) SetCode(code []byte, alg Algorithm) error + func (c *Card) Validate(code []byte) error + type Code struct + Digits int + Hash []byte + TouchRequired bool + Truncated bool + Type Type + func (c Code) OTP() string + type Error iso.Code + func (e Error) Error() string + func (e Error) HasMore() bool + type Name struct + Algorithm Algorithm + Name string + Type Type + func (n *Name) String() string + type Select struct + Algorithm []byte + Challenge []byte + Name []byte + Version []byte + func (s *Select) UnmarshalBinary(b []byte) error + type Type byte + const Hotp + const Totp + func (t Type) String() string Other modules containing this package cunicu.li/go-ykoath