Versions in this module Expand all Collapse all v0 v0.55.0 May 4, 2024 v0.54.0 Apr 4, 2024 Changes in this version + const CryptoHashSHA1 + const CryptoHashSHA256 + const CryptoHashSHA512 + const DefCodeDigits + const DefHash + const DefStepsBack + const DefTimeStep + type CryptoHash crypto.Hash + type Protocol struct + func New(cryptoHash CryptoHash, codeDigits, timeStep int) Protocol + func (p *Protocol) Generate(secret []byte) (otp string, err error) + func (p *Protocol) GenerateN(secret []byte, n int) (listOTP []string, err error) + func (p *Protocol) GenerateNWithTime(ts time.Time, secret []byte, n int) (listOTP []string, err error) + func (p *Protocol) GenerateWithTime(ts time.Time, secret []byte) (otp string, err error) + func (p *Protocol) Verify(secret []byte, token string, stepsBack int) bool