# getPublicKey method

Uint8List getPublicKey()

Gets the the certificate public key.

return The certificate public key. throws BiosealException An error has occurred during Bioseal Library execution.

## Implementation

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