verifyFromString method

VerificationResult verifyFromString(
  1. String? data
)

Decodes and verifies the specified string buffer.

param data The string buffer containing the BioSeal code. return Receives the verification results. throws BiosealException An error has occurred during Bioseal Library execution.

Implementation

VerificationResult verifyFromString(String? data) {
  Pointer<Char>? pData = data?.toNativeUtf8().cast<Char>();
  Pointer<id3BiosealVerificationResult> pResult = calloc();
  try {
    var err = biosealSDK.id3Bioseal_VerifyFromString(_pHandle.value, pData ?? nullptr, pResult);
    if (err != BiosealError.success.value) {
      calloc.free(pResult);
      throw BiosealException(err);
    }
    return VerificationResult(pResult);
  } finally {
    if (pData != null) {
      calloc.free(pData);
    }
  }
}