func (hotp *HOTP) Generate() (string, error) {

	if hotp.Secret == "" {
		return "", errors.New("HOTP secret key required")
	}

	if hotp.Digits == 0 {
		hotp.Digits = 6
	}

	return generateOTP(hotp.Secret, hotp.Counter, hotp.Digits, "SHA1")
}
// Generates HOTP code and returns OTP as string and any error encountered.
Generates HOTP code and returns OTP as string and any error encountered.
// Generates HOTP code and returns OTP as string and any error encountered .
func (hotp *HOTP) Generate() (string, error) {
	if hotp.Secret == "" {
		return "", errors.New("HOTP secret key required")
	}
	if hotp.Digits == 0 {
		hotp.Digits = 6
	}
	return generateOTP(hotp.Secret, hotp.Counter, hotp.Digits, "SHA1")
}
func ( hotp * HOTP ) Generate ( ) ( string , error ) { if hotp . Secret == " " { return " " , errors . New ( " " ) } if hotp . Digits == 0 { hotp . Digits = 6 } return generateOTP ( hotp . Secret , hotp . Counter , hotp . Digits , " " ) }
Generates HOTP code and returns OTP as string and any error encountered.
Generates HOTP code and returns OTP as string and any error encountered .