public static extern void IDataWriteToSelfEncryptorNative( IntPtr appPtr, ulong seHandle, IntPtr data, IntPtr size, IntPtr self, ResultCb callback);
public static extern void MDataPermissionsInsertNative( IntPtr appPtr, ulong permissionsHandle, ulong userHandle, ulong permissionSetHandle, IntPtr self, ResultCb callback);
public static extern void MDataPutNative( IntPtr appPtr, ulong infoHandle, ulong permissionsHandle, ulong entriesHandle, IntPtr self, ResultCb callback);
public static Task InsertAsync(NativeHandle entryActionsH, List <byte> entKey, List <byte> entVal) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; var entKeyPtr = entKey.ToIntPtr(); var entValPtr = entVal.ToIntPtr(); AppBindings.MDataEntryActionsInsert( Session.AppPtr, entryActionsH, entKeyPtr, (IntPtr)entKey.Count, entValPtr, (IntPtr)entVal.Count, callback); Marshal.FreeHGlobal(entKeyPtr); Marshal.FreeHGlobal(entValPtr); return(tcs.Task); }
public void MDataPermissionsInsert( IntPtr appPtr, ulong permissionsHandle, ulong userHandle, ulong permissionSetHandle, ResultCb callback) { MDataPermissionsInsertNative(appPtr, permissionsHandle, userHandle, permissionSetHandle, callback.ToHandlePtr(), OnResultCb); }
public static extern void MDataEntryActionsInsertNative( IntPtr appPtr, ulong actionsHandle, IntPtr keyPtr, IntPtr keyLen, IntPtr valuePtr, IntPtr valueLen, IntPtr self, ResultCb callback);
private static extern void MDataEntriesInsertNative( IntPtr appPtr, ulong entriesHandle, IntPtr keyPtr, IntPtr keyLen, IntPtr valuePtr, IntPtr valueLen, IntPtr self, ResultCb callback);
public void MDataEntryActionsInsert( IntPtr appPtr, ulong actionsHandle, IntPtr keyPtr, IntPtr keyLen, IntPtr valuePtr, IntPtr valueLen, ResultCb callback) { MDataEntryActionsInsertNative(appPtr, actionsHandle, keyPtr, keyLen, valuePtr, valueLen, callback.ToHandlePtr(), OnResultCb); }
public static Task SelfEncryptorReaderFreeAsync(ulong sEReaderHandle) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.IDataSelfEncryptorReaderFree(Session.AppPtr, sEReaderHandle, callback); return(tcs.Task); }
public static Task AllowAsync(NativeHandle permissionSetH, MDataAction allowAction) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.MDataPermissionSetAllow(Session.AppPtr, permissionSetH, allowAction, callback); return(tcs.Task); }
public static Task FreeAsync(ulong cipherOptHandle) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.CipherOptFree(Session.AppPtr, cipherOptHandle, callback); return(tcs.Task); }
public static Task PutAsync(NativeHandle mDataInfoH, NativeHandle permissionsH, NativeHandle entriesH) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.MDataPut(Session.AppPtr, mDataInfoH, permissionsH, entriesH, callback); return(tcs.Task); }
public static Task FreeAsync(ulong entKeysH) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.MDataKeysFree(Session.AppPtr, entKeysH, callback); return(tcs.Task); }
public static Task InsertAsync(NativeHandle permissionsH, NativeHandle forUserH, NativeHandle permissionSetH) { var tcs = new TaskCompletionSource <object>(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.MDataPermissionsInsert(Session.AppPtr, permissionsH, forUserH, permissionSetH, callback); return(tcs.Task); }
public static Task <object> WriteToSelfEncryptorAsync(NativeHandle seHandle, List <byte> data) { var tcs = new TaskCompletionSource <object>(); var dataPtr = data.ToIntPtr(); ResultCb callback = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(null); }; AppBindings.IDataWriteToSelfEncryptor(Session.AppPtr, seHandle, dataPtr, (IntPtr)data.Count, callback); Marshal.FreeHGlobal(dataPtr); return(tcs.Task); }
public static Task <List <List <byte> > > ForEachAsync(NativeHandle entKeysH) { var tcs = new TaskCompletionSource <List <List <byte> > >(); var keys = new List <List <byte> >(); MDataKeysForEachCb forEachCb = (_, bytePtr, len) => { var key = bytePtr.ToList <byte>(len); keys.Add(key); }; ResultCb forEachResCb = (_, result) => { if (result.ErrorCode != 0) { tcs.SetException(result.ToException()); return; } tcs.SetResult(keys); }; AppBindings.MDataKeysForEach(Session.AppPtr, entKeysH, forEachCb, forEachResCb); return(tcs.Task); }
public void MDataInfoFree(IntPtr appPtr, ulong infoHandle, ResultCb callback) { MDataInfoFreeNative(appPtr, infoHandle, callback.ToHandlePtr(), OnResultCb); }
public static extern void MDataEntryActionsFreeNative(IntPtr appPtr, ulong actionsHandle, IntPtr self, ResultCb callback);
public void MDataEntryActionsFree(IntPtr appPtr, ulong actionsHandle, ResultCb callback) { MDataEntryActionsFreeNative(appPtr, actionsHandle, callback.ToHandlePtr(), OnResultCb); }
public void CipherOptFree(IntPtr appPtr, ulong cipherOptHandle, ResultCb callback) { CipherOptFreeNative(appPtr, cipherOptHandle, callback.ToHandlePtr(), OnResultCb); }
public void IDataWriteToSelfEncryptor(IntPtr appPtr, ulong seHandle, IntPtr data, IntPtr size, ResultCb callback) { IDataWriteToSelfEncryptorNative(appPtr, seHandle, data, size, callback.ToHandlePtr(), OnResultCb); }
public static extern void IDataSelfEncryptorWriterFreeNative(IntPtr appPtr, ulong sEWriterHandle, IntPtr self, ResultCb callback);
public void IDataSelfEncryptorWriterFree(IntPtr appPtr, ulong sEWriterHandle, ResultCb callback) { IDataSelfEncryptorWriterFreeNative(appPtr, sEWriterHandle, callback.ToHandlePtr(), OnResultCb); }
public void AppSetAdditionalSearchPath(string path, ResultCb callback) { AppSetAdditionalSearchPathNative(path, callback.ToHandlePtr(), OnResultCb); }
public void EncSecretKeyFree(IntPtr appPtr, ulong encryptSecKeyHandle, ResultCb callback) { EncSecretKeyFreeNative(appPtr, encryptSecKeyHandle, callback.ToHandlePtr(), OnResultCb); }
public static extern void CipherOptFreeNative(IntPtr appPtr, ulong cipherOptHandle, IntPtr self, ResultCb callback);
public static extern void SignKeyFreeNative(IntPtr appPtr, ulong signKeyHandle, IntPtr self, ResultCb callback);
public void MDataEntriesFree(IntPtr appPtr, ulong entriesHandle, ResultCb callback) { MDataEntriesFreeNative(appPtr, entriesHandle, callback.ToHandlePtr(), OnResultCb); }
public static extern void EncSecretKeyFreeNative(IntPtr appPtr, ulong encryptSecKeyHandle, IntPtr self, ResultCb callback);
public static extern void AppSetAdditionalSearchPathNative(string path, IntPtr self, ResultCb callback);