-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrsaengine.h
More file actions
40 lines (25 loc) · 829 Bytes
/
Copy pathrsaengine.h
File metadata and controls
40 lines (25 loc) · 829 Bytes
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
#pragma once
#include <iostream>
#include "rsakey.h"
using namespace std;
class RSAEngine {
private:
RSAKey* currentKey;
double lastEncryptTime;
double lastDecryptTime;
float* benchmarkResults;
int benchmarkCount;
static int engineCount;
public:
RSAEngine(RSAKey* key);
RSAEngine(const RSAEngine& other);
RSAEngine& operator=(const RSAEngine& other);
BigInt encrypt(const BigInt& mesaj);
BigInt decrypt(const BigInt& criptat);
void benchmark(int iterations);
double getLastEncryptTime() const;
double getLastDecryptTime() const;
friend ostream& operator<<(ostream& os, const RSAEngine& eng);
friend istream& operator>>(istream& is, RSAEngine& eng);
~RSAEngine();
};