first changes

This commit is contained in:
ErikasKontenis
2019-09-29 21:56:37 +03:00
parent 9299222bd1
commit ad4cf36193
28 changed files with 1042 additions and 310 deletions

View File

@@ -20,24 +20,24 @@
#ifndef FS_RSA_H_C4E277DA8E884B578DDBF0566F504E91
#define FS_RSA_H_C4E277DA8E884B578DDBF0566F504E91
#include <gmp.h>
#include <cryptopp/rsa.h>
#include <string>
class RSA
{
public:
RSA();
~RSA();
public:
RSA() = default;
// non-copyable
RSA(const RSA&) = delete;
RSA& operator=(const RSA&) = delete;
// non-copyable
RSA(const RSA&) = delete;
RSA& operator=(const RSA&) = delete;
void setKey(const char* pString, const char* qString);
void decrypt(char* msg) const;
void loadPEM(const std::string& filename);
void decrypt(char* msg) const;
private:
//use only GMP
mpz_t n, d;
private:
CryptoPP::RSA::PrivateKey pk;
};
#endif
#endif