def validate_otp(hsm, from_key):
    public_id, otp = split_id_otp(from_key)
    return hsm.db_validate_yubikey_otp(modhex_decode(public_id).decode('hex'),
                                       modhex_decode(otp).decode('hex')
                                       )
Try to validate an OTP from a YubiKey using the internal database
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/yubikey.py/validate_otp