Skip to content

Commit 222ef69

Browse files
authored
Remove unused imports (#61)
1 parent 4e7276b commit 222ef69

File tree

5 files changed

+9
-20
lines changed

5 files changed

+9
-20
lines changed

include/afhe.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <string> /* string class */
1313
#include <cstdint> /* uint64_t */
1414
#include <vector> /* vector */
15-
#include <memory> /* shared_ptr */
1615

1716
// Forward Declarations
1817
class ACiphertext; /* Ciphertext */
@@ -196,11 +195,11 @@ class Afhe
196195

197196
/**
198197
* @brief Generates a context for the Fully Homomorphic Encryption (FHE) scheme from a set of parameters.
199-
*
198+
*
200199
* The context contains all the public parameters needed for the encryption and decryption processes.
201-
*
200+
*
202201
* @param params A string representing the parameters used to generate the context.
203-
*
202+
*
204203
* @return A string representing the status of generated context.
205204
*/
206205
virtual string ContextGen(string params) = 0;
@@ -225,7 +224,7 @@ class Afhe
225224
* Exposes lower level interface for saving parameters.
226225
*/
227226
virtual void save_parameters_inplace(byte* out, int size, string compression_mode="none") = 0;
228-
227+
229228
/**
230229
* @brief Loads the parameters, used for re-generating the context.
231230
* Exposure lower level interface for loading parameters.
@@ -492,7 +491,7 @@ class Afhe
492491

493492
/**
494493
* @brief Raises a ciphertext to a power and stores the result in another ciphertext.
495-
*
494+
*
496495
* Applies relinearization after each multiplication step.
497496
* @param ctxt The ciphertext to be raised to a power.
498497
* @param power The power to raise the ciphertext to.

include/backend/aseal.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@
1212
#ifndef ASEAL_H
1313
#define ASEAL_H
1414

15-
#include <iostream> /* Print in cout */
1615
#include <string> /* string class */
1716
#include <vector> /* Vectorizing all operations */
18-
#include <thread> /* memory pools, multithread*/
1917
#include <memory> /* Smart Pointers*/
20-
#include <complex> /* Complex Numbers */
21-
#include <math.h> /* pow */
22-
#include <fstream> /* file management */
23-
#include <assert.h> /* assert */
2418
#include <map> /* map */
2519

2620
#include "seal/seal.h" /* Microsoft SEAL */
@@ -352,7 +346,7 @@ class Aseal : public Afhe {
352346
/**
353347
* @brief Assign Encoders used for encoding and decoding.
354348
* @param ignore_exception If true, ignore exceptions.
355-
*
349+
*
356350
* We may want to ignore exceptions if we are setting the encoders without
357351
* access to the original parameters.
358352
*/

include/error_handling.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
* ------------------------------------------------------------------
88
* @author Jeffrey Murray Jr (jeffmur)
99
*/
10-
#include <assert.h> /* assert */
11-
#include <memory> /* Smart Pointers*/
1210
#include <cstring> /* strcpy */
1311
#include <iostream> /* Print in cout */
1412
using namespace std;
@@ -29,7 +27,7 @@ class ErrorTranslator {
2927
ErrorTranslator& operator=(const ErrorTranslator&) = delete;
3028

3129
// Translate a C++ exception to a Dart exception message
32-
void set_error(const std::exception& e) {
30+
void set_error(const exception& e) {
3331
string message = e.what();
3432

3533
// str -> char* to avoid memory leak

include/fhe.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
#ifndef FHE_H
1111
#define FHE_H
1212

13-
#include <vector> /* Vectorizing all operations */
14-
#include <string> /* string class */
13+
1514
#include <map> /* map */
1615
#include "afhe.h" /* Abstraction Layer */
1716
#include "error_handling.h" /* Error Handling */
@@ -212,7 +211,7 @@ extern "C" {
212211
* @param afhe Pointer to the backend library.
213212
*/
214213
void generate_keys(Afhe* afhe);
215-
214+
216215
/**
217216
* @brief Generate relinearization keys for the backend library.
218217
* @param afhe Pointer to the backend library.

src/backend/aseal.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "aseal.h"
1313
#include "afhe.h"
14-
#include <bitset>
1514

1615
using namespace std;
1716
using namespace seal;

0 commit comments

Comments
 (0)