revokeAll method

SealdRevokeResult revokeAll()

Revokes this session entirely.

Returns a SealdRevokeResult.

Implementation

SealdRevokeResult revokeAll() {
  final Pointer<Pointer<NativeSealdRevokeResult>> result =
      calloc<Pointer<NativeSealdRevokeResult>>();
  final Pointer<Pointer<NativeSealdError>> err =
      calloc<Pointer<NativeSealdError>>();

  final int resultCode =
      _bindings.SealdEncryptionSession_RevokeAll(_ptr.pointer(), result, err);

  if (resultCode != 0) {
    calloc.free(result);
    throw SealdException._fromCPtr(err);
  } else {
    final SealdRevokeResult res = SealdRevokeResult._fromC(result.value);
    calloc.free(result);
    calloc.free(err);
    return res;
  }
}