.. index:: 
  !DocumentLicense.checkLicenseWithCard Method
  
.. _id3_document_document_license_check_license_with_card_class_method:

===============================================================================
DocumentLicense.checkLicenseWithCard Method
===============================================================================

Module: :ref:`DocumentLicense<id3_document_document_license_class>`

Definition
----------

Checks the license by using a card-based verification process.

It takes the path to the license file and outputs a challenge response for further verification.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        @staticmethod
        check_license_with_card(license_path: str) -> bytearray

      **Parameters**

        .. line-block::

          ``license_path`` str
          :guilabel:`in` The file path to the license that needs to be checked.


      **Returns**

        .. line-block::

          ``bytearray``
          An array to hold the challenge response generated by the host.
          This 16-byte array is used in the license verification process.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        static Uint8List checkLicenseWithCard(String? licensePath)

      **Parameters**

        .. line-block::

          ``licensePath`` String
          :guilabel:`in` The file path to the license that needs to be checked.


      **Returns**

        .. line-block::

          ``Uint8List``
          An array to hold the challenge response generated by the host.
          This 16-byte array is used in the license verification process.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public static byte[] CheckLicenseWithCard(string licensePath)

      **Parameters**

        .. line-block::

          ``licensePath`` string
          :guilabel:`in` The file path to the license that needs to be checked.


      **Returns**

        .. line-block::

          ``byte[]``
          An array to hold the challenge response generated by the host.
          This 16-byte array is used in the license verification process.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public static byte[] checkLicenseWithCard(String licensePath) throws DocumentException

      **Parameters**

        .. line-block::

          ``licensePath`` String
          :guilabel:`in` The file path to the license that needs to be checked.


      **Returns**

        .. line-block::

          ``byte[]``
          An array to hold the challenge response generated by the host.
          This 16-byte array is used in the license verification process.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public static func checkLicenseWithCard(licensePath: String) throws -> [UInt8]

      **Parameters**

        .. line-block::

          ``licensePath`` String
          :guilabel:`in` The file path to the license that needs to be checked.


      **Returns**

        .. line-block::

          ``[UInt8]``
          An array to hold the challenge response generated by the host.
          This 16-byte array is used in the license verification process.

      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DocumentLicense_CheckLicenseWithCard (
            const char * licensePath, 
            unsigned char * challengeR1, 
            int * challengeR1Size)

      **Parameters**

        .. line-block::

          ``licensePath`` const char *
          :guilabel:`in` The file path to the license that needs to be checked.

          ``challengeR1`` unsigned char *
          :guilabel:`out` An array to hold the challenge response generated by the host.

          ``challengeR1Size`` int *
          :guilabel:`in` Size of the 'challengeR1' buffer. Receives the number of elements in the 'challengeR1' array.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.


