forked from bristolcrypto/SPDZ-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInput.h
43 lines (31 loc) · 725 Bytes
/
Input.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
37
38
39
40
41
42
43
// (C) 2018 University of Bristol. See License.txt
/*
* Input.h
*
*/
#ifndef PROCESSOR_INPUT_H_
#define PROCESSOR_INPUT_H_
#include <vector>
using namespace std;
#include "Math/Share.h"
#include "Auth/MAC_Check.h"
#include "Processor/Buffer.h"
#include "Tools/time-func.h"
class Processor;
template<class T>
class Input
{
Processor& proc;
MAC_Check<T>& MC;
vector< vector< Share<T> > > shares;
Buffer<T,T> buffer;
Timer timer;
void adjust_mac(Share<T>& share, T& value);
public:
int values_input;
Input(Processor& proc, MAC_Check<T>& mc);
~Input();
void start(int player, int n_inputs);
void stop(int player, vector<int> targets);
};
#endif /* PROCESSOR_INPUT_H_ */