-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkeygen.h
29 lines (24 loc) · 915 Bytes
/
keygen.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
#ifndef KEYGEN_H
#define KEYGEN_H
#include "QryptSecurity/qryptsecurity.h"
#include "QryptSecurity/qryptsecurity_exceptions.h"
#include "QryptSecurity/qryptsecurity_logging.h"
#include <iostream>
#include <string>
#include <stdexcept>
#include <vector>
class KeyGen {
public:
KeyGen(std::string token, std::string key_type = "otp", size_t key_len = 32, uint32_t key_ttl = 3600, std::string key_format = "hexstr",
::QryptSecurity::LogLevel log_level = ::QryptSecurity::LogLevel::QRYPTSECURITY_LOG_LEVEL_DISABLE,
std::string cacert_path = "");
void generate(std::ostream& key_out, std::ostream& metadata_out);
void replicate(std::ostream& key_out, std::istream& metadata_in);
private:
std::unique_ptr<QryptSecurity::IKeyGenDistributedClient> sdk_client;
std::string key_type;
size_t key_len;
uint32_t key_ttl;
std::string key_format;
};
#endif /* KEYGEN_H */