# getSerialNumberString method

String getSerialNumberString()

Gets the the serial number from the certificate as a string.

return The serial number from the certificate as a string. throws BiosealException An error has occurred during Bioseal Library execution.

## Implementation

    String getSerialNumberString() {
      Pointer<Char> pSerialNumberString = nullptr;
      Pointer<Int> pSerialNumberStringSize = calloc.allocate(1);
      pSerialNumberStringSize[0] = -1;
      try {
        var err = biosealSDK.id3BiosealCertificateInformation_GetSerialNumberString(_pHandle.value, pSerialNumberString, pSerialNumberStringSize);
        if (err == BiosealError.insufficientBuffer.value) {
          pSerialNumberString = calloc.allocate(pSerialNumberStringSize.value);
          err = biosealSDK.id3BiosealCertificateInformation_GetSerialNumberString(_pHandle.value, pSerialNumberString, pSerialNumberStringSize);
          if (err != BiosealError.success.value) {
            throw BiosealException(err);
          }
        }
        final vSerialNumberString = utf8.decode(Uint8List.fromList(pSerialNumberString.cast<Uint8>().asTypedList(pSerialNumberStringSize.value)));
        return vSerialNumberString;
      } finally {
        calloc.free(pSerialNumberString);
        calloc.free(pSerialNumberStringSize);
      }
    }