func (otp *OneTimePassword) HOTP(secret []byte, count uint64) uint {
    hs := otp.hmacSum(secret, count)
    return otp.truncate(hs)
}
HOTP returns a HOTP code with the given secret and counter.
package onetime
import (
    "crypto/hmac"
    "crypto/sha1"
    "encoding/binary"
    "errors"
    "hash"
    "math"
    "time"
)
type OneTimePassword struct {
    Digit    int               
    TimeStep time.Duration     
    BaseTime time.Time         
    Hash     func() hash.Hash  
}