askarKeyEntryListLoadLocal function

AskarResult<LocalKeyHandle> askarKeyEntryListLoadLocal(
  1. KeyEntryListHandle handle,
  2. int index
)

Implementation

AskarResult<LocalKeyHandle> askarKeyEntryListLoadLocal(
  KeyEntryListHandle handle,
  int index,
) {
  Pointer<IntPtr> outPtr = calloc<IntPtr>();

  try {
    final funcResult = nativeAskarKeyEntryListLoadLocal(handle.toInt(), index, outPtr);

    final errorCode = ErrorCode.fromInt(funcResult);

    final out = LocalKeyHandle.fromPointer(errorCode, outPtr);

    return AskarResult<LocalKeyHandle>(errorCode, out);
  } finally {
    freePointer(outPtr);
  }
}