.. index:: 
  !DocumentLicense.checkLicenseBufferWithCard Method
  
.. _id3_document_document_license_check_license_buffer_with_card_class_method:

===============================================================================
DocumentLicense.checkLicenseBufferWithCard Method
===============================================================================

Module: :ref:`DocumentLicense<id3_document_document_license_class>`

Definition
----------

Checks the license using a buffer containing the license data and a card-based verification process.

It outputs a challenge response for further verification.


.. tab-set::

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

      .. code:: Python

        @staticmethod
        check_license_buffer_with_card(license_data: bytearray) -> bytearray

      **Parameters**

        .. line-block::

          ``license_data`` bytearray
          :guilabel:`in` A buffer containing the license file data.


      **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 checkLicenseBufferWithCard(Uint8List? licenseData)

      **Parameters**

        .. line-block::

          ``licenseData`` Uint8List
          :guilabel:`in` A buffer containing the license file data.


      **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[] CheckLicenseBufferWithCard(byte[] licenseData)

      **Parameters**

        .. line-block::

          ``licenseData`` byte[]
          :guilabel:`in` A buffer containing the license file data.


      **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[] checkLicenseBufferWithCard(byte[] licenseData) throws DocumentException

      **Parameters**

        .. line-block::

          ``licenseData`` byte[]
          :guilabel:`in` A buffer containing the license file data.


      **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 checkLicenseBufferWithCard(licenseData: [UInt8]) throws -> [UInt8]

      **Parameters**

        .. line-block::

          ``licenseData`` [UInt8]
          :guilabel:`in` A buffer containing the license file data.


      **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_CheckLicenseBufferWithCard (
            unsigned char * licenseData, 
            int licenseDataSize, 
            unsigned char * challengeR1, 
            int * challengeR1Size)

      **Parameters**

        .. line-block::

          ``licenseData`` unsigned char *
          :guilabel:`in` A buffer containing the license file data.

          ``licenseDataSize`` int
          :guilabel:`in` Size of the 'licenseData' buffer.

          ``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.


