HElib 1.0 Implementing Homomorphic Encryption

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Friends Pages
replicate.h
Go to the documentation of this file.
1 /* Copyright (C) 2012,2013 IBM Corp.
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 * See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along
13 * with this program; if not, write to the Free Software Foundation, Inc.,
14 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 */
16 #ifndef _replicate_H_
17 #define _replicate_H_
18
37 #include "FHE.h"
38 #include "EncryptedArray.h"
39
40
41 // set to true to see some more info...
42 extern bool replicateVerboseFlag;
43
44
47 void replicate(const EncryptedArray& ea, Ctxt& ctx, long pos);
48
51 void replicate0(const EncryptedArray& ea, Ctxt& ctxt, long pos);
52
54 class ReplicateHandler {
55 public:
56 virtual void handle(const Ctxt& ctxt) = 0;
57 virtual ~ReplicateHandler() {};
58 };
59
75 void replicateAll(const EncryptedArray& ea, const Ctxt& ctxt,
76 ReplicateHandler *handler, long recBound = 64);
77
78
82 void replicateAllOrig(const EncryptedArray& ea, const Ctxt& ctxt,
83 ReplicateHandler *handler);
84 #endif