-
Notifications
You must be signed in to change notification settings - Fork 709
/
encryptor.h
36 lines (23 loc) · 1.37 KB
/
encryptor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#pragma once
///////////////////////////////////////////////////////////////////////////
//
// This API is provided as a simple interface for Microsoft SEAL library
// that can be PInvoked by .Net code.
//
///////////////////////////////////////////////////////////////////////////
#include "seal/c/defines.h"
#include <stdint.h>
SEAL_C_FUNC Encryptor_Create(void *context, void *public_key, void *secret_key, void **encryptor);
SEAL_C_FUNC Encryptor_SetPublicKey(void *thisptr, void *public_key);
SEAL_C_FUNC Encryptor_SetSecretKey(void *thisptr, void *secret_key);
SEAL_C_FUNC Encryptor_Encrypt(void *thisptr, void *plaintext, void *destination, void *pool_handle);
SEAL_C_FUNC Encryptor_EncryptZero1(void *thisptr, uint64_t *parms_id, void *destination, void *pool_handle);
SEAL_C_FUNC Encryptor_EncryptZero2(void *thisptr, void *destination, void *pool_handle);
SEAL_C_FUNC Encryptor_EncryptSymmetric(
void *thisptr, void *plaintext, bool save_seed, void *destination, void *pool_handle);
SEAL_C_FUNC Encryptor_EncryptZeroSymmetric1(
void *thisptr, uint64_t *parms_id, bool save_seed, void *destination, void *pool_handle);
SEAL_C_FUNC Encryptor_EncryptZeroSymmetric2(void *thisptr, bool save_seed, void *destination, void *pool_handle);
SEAL_C_FUNC Encryptor_Destroy(void *thisptr);