getOutputData method
Gets the the decrypted data as a binary array.
return The decrypted data as a binary array. throws BiosealException An error has occurred during Bioseal Library execution.
Implementation
Uint8List getOutputData() {
Pointer<UnsignedChar> pOutputData = nullptr;
Pointer<Int> pOutputDataSize = calloc();
pOutputDataSize[0] = -1;
try {
var err = biosealSDK.id3BiosealDecryptionArgs_GetOutputData(_pHandle.value, pOutputData, pOutputDataSize);
if (err == BiosealError.insufficientBuffer.value) {
pOutputData = calloc.allocate(pOutputDataSize.value);
err = biosealSDK.id3BiosealDecryptionArgs_GetOutputData(_pHandle.value, pOutputData, pOutputDataSize);
}
if (err != BiosealError.success.value) {
throw BiosealException(err);
}
final vOutputData = Uint8List.fromList(pOutputData.cast<Uint8>().asTypedList(pOutputDataSize.value));
return vOutputData;
} finally {
calloc.free(pOutputData);
calloc.free(pOutputDataSize);
}
}