hotp.go
func (otp *HOTP) YubiKey(in string) (string, string, bool) {
	if len(in) < otp.Digits {
		return "", "", false
	}

	otpStart := len(in) - otp.Digits
	code := in[otpStart:]
	pubid := in[:otpStart]
	return code, pubid, true
}
func (otp *HOTP) YubiKey(in string) (string, string, bool) {
	if len(in) < otp.Digits {
		return "", "", false
	}

	otpStart := len(in) - otp.Digits
	code := in[otpStart:]
	pubid := in[:otpStart]
	return code, pubid, true
}
func ( otp * HOTP ) YubiKey ( in string ) ( string , string , bool ) { if len ( in ) < otp . Digits { return " " , " " , false } otpStart := len ( in ) - otp . Digits code := in [ otpStart : ] pubid := in [ : otpStart ] return code , pubid , true }
// YubiKey reads an OATH-HOTP string as returned by a YubiKey, and
// returns three values. The first value contains the actual OTP, the
// second value contains the YubiKey's token identifier, and the final
// value indicates whether the input string was a valid YubiKey
// OTP. This does not check whether the code is correct or not, it
// only ensures that it is well-formed output from a token and
// splits the output into the code and the public identity.
YubiKey reads an OATH - HOTP string as returned by a YubiKey and returns three values . The first value contains the actual OTP the second value contains the YubiKey s token identifier and the final value indicates whether the input string was a valid YubiKey OTP . This does not check whether the code is correct or not it only ensures that it is well - formed output from a token and splits the output into the code and the public identity .