# getSerialNumber method

Uint8List getSerialNumber()

Gets the the serial number of the certificate.

return The serial number of the certificate. throws BiosealException An error has occurred during Bioseal Library execution.

## Implementation

    Uint8List getSerialNumber() {
      Pointer<UnsignedChar> pSerialNumber = nullptr;
      Pointer<Int> pSerialNumberSize = calloc();
      pSerialNumberSize[0] = -1;
      try {
        var err = biosealSDK.id3BiosealCertificateInformation_GetSerialNumber(_pHandle.value, pSerialNumber, pSerialNumberSize);
        if (err == BiosealError.insufficientBuffer.value) {
          pSerialNumber = calloc.allocate(pSerialNumberSize.value);
          err = biosealSDK.id3BiosealCertificateInformation_GetSerialNumber(_pHandle.value, pSerialNumber, pSerialNumberSize);
        }
        if (err != BiosealError.success.value) {
          throw BiosealException(err);
        }
        final vSerialNumber = Uint8List.fromList(pSerialNumber.cast<Uint8>().asTypedList(pSerialNumberSize.value));
        return vSerialNumber;
      } finally {
        calloc.free(pSerialNumber);
        calloc.free(pSerialNumberSize);
      }
    }