docs: def validate_yubikey_with_aead(hsm, from_key, aead, key_handle):
      """
      Try to validate an OTP from a YubiKey using the AEAD that can decrypt this YubiKey's
      internal secret, using the key_handle for the AEAD.
  
      `from_key' is the modhex encoded string emitted when you press the
      button on your YubiKey.
  
      Will only return on succesfull validation. All failures will result
      in an L{pyhsm.exception.YHSM_CommandFailed}.
  
      @param hsm: The YHSM instance
      @param from_key: The OTP from a YubiKey (in modhex)
      @param aead: AEAD containing the cryptographic key and permission flags
      @param key_handle: The key handle that can decrypt the AEAD
      @type hsm: L{pyhsm.YHSM}
      @type from_key: string
      @type aead: L{YHSM_GeneratedAEAD} or string
      @type key_handle: integer or string
  
      @returns: validation response
      @rtype: L{YHSM_ValidationResult}
  
      @see: L{pyhsm.validate_cmd.YHSM_Cmd_AEAD_Validate_OTP.parse_result}
      """
  
      from_key = pyhsm.util.input_validate_str(from_key, 'from_key', max_len = 48)
      nonce = aead.nonce
      aead = pyhsm.util.input_validate_aead(aead)
      key_handle = pyhsm.util.input_validate_key_handle(key_handle)
  
      public_id, otp = split_id_otp(from_key)
  
      public_id = modhex_decode(public_id)
      otp = modhex_decode(otp)
  
      if not nonce:
          nonce = public_id.decode('hex')
  
      return hsm.validate_aead_otp(nonce, otp.decode('hex'),
          key_handle, aead)