finalizeCheckLicenseWithCard static method

void finalizeCheckLicenseWithCard(
  1. Uint8List? cryptogram
)

Finalizes the license check process using the provided cryptogram. It ensures the integrity and authenticity of the license verification.

param cryptogram A 32-byte array containing the cryptogram used for final verification. throws DocumentException An error has occurred during Document Library execution.

Implementation

static void finalizeCheckLicenseWithCard(Uint8List? cryptogram) {
  Pointer<UnsignedChar>? pCryptogram;
  if (cryptogram != null) {
  	pCryptogram = calloc.allocate<UnsignedChar>(cryptogram.length);
  	pCryptogram.cast<Uint8>().asTypedList(cryptogram.length).setAll(0, cryptogram);
  }
  try {
    var err = documentSDK.id3DocumentLicense_FinalizeCheckLicenseWithCard(pCryptogram ?? nullptr, cryptogram?.length ?? 0);
    if (err != DocumentError.success.value) {
      throw DocumentException(err);
    }
  } finally {
    if (pCryptogram != null) {
      calloc.free(pCryptogram);
    }
  }
}