func (otp *HOTP) Check(code string) bool {
	codeBytes := []byte(code)
	genCode := []byte(otp.OTP())
	if subtle.ConstantTimeCompare(codeBytes, genCode) != 1 {
		otp.setCounter(otp.Counter() - 1)
		return false
	}
	return true
}
func (otp *HOTP) Check(code string) bool {
	codeBytes := []byte(code)
	genCode := []byte(otp.OTP())
	if subtle.ConstantTimeCompare(codeBytes, genCode) != 1 {
		otp.setCounter(otp.Counter() - 1)
		return false
	}
	return true
}
func ( otp * HOTP ) Check ( code string ) bool { codeBytes := [ ] byte ( code ) genCode := [ ] byte ( otp . OTP ( ) ) if subtle . ConstantTimeCompare ( codeBytes , genCode ) != 1 { otp . setCounter ( otp . Counter ( ) - 1 ) return false } return true }
// Check takes an input code and verifies it against the OTP. If
// successful, the counter is incremented.
Check takes an input code and verifies it against the OTP . If successful the counter is incremented .