47 #ifndef _MIRA_RSAKEY_H_ 48 #define _MIRA_RSAKEY_H_ 62 struct OpenSSLRSAWrapper;
84 RSAKey(
const std::string& n,
const std::string& e,
const std::string& d);
96 RSAKey(
const OpenSSLRSAWrapper* key);
107 template<
typename Reflector>
110 std::stringstream ss;
112 std::string str = ss.str();
116 template<
typename Reflector>
121 std::stringstream ss(str);
188 static void generateKey(
unsigned int iKeyBitLength,
201 friend std::ostream&
operator<<(std::ostream& stream,
203 friend std::istream&
operator>>(std::istream& stream,
207 OpenSSLRSAWrapper* mKey;
221 std::ostream&
operator<<(std::ostream& stream,
229 std::istream&
operator>>(std::istream& stream, RSAKey& key);
234 template<
typename SerializerTag>
bool clear()
Clear the key values.
bool isPublicKey() const
Is this a public key?
Type trait that indicates whether a type should be serialized "transparently", i.e.
Definition: IsTransparentSerializable.h:81
static void generateKey(unsigned int iKeyBitLength, RSAKey &oPublicKey, RSAKey &oPrivateKey)
Generate a new RSA key.
Definition of a RSA key (public or private)
Definition: RSAKey.h:71
bool isValid() const
Is this a valid key?
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
bool operator==(const RSAKey &key)
The '==' operator.
#define MIRA_SPLIT_REFLECT_MEMBER
Macro that insert a class member reflect() method just splitting reflection into a reflectRead() and ...
Definition: SplitReflect.h:209
static void feedRandomNumberGenerator(size_t count)
Feed the random number generator.
std::string getNStr() const
Get N as a hexadecimal number.
Provides type trait that indicates whether a type should be serialized "transparently".
Provides MIRA_SPLIT_REFLECT macros.
std::string getDStr() const
Get D as a hexadecimal number.
friend std::istream & operator>>(std::istream &stream, RSAKey &key)
The '>>' operator for RSAKey.
std::ostream & operator<<(std::ostream &s, const LibraryVersion &version)
std::istream & operator>>(std::istream &stream, RSAKey &key)
The '>>' operator for RSAKey.
MIRA_SPLIT_REFLECT_MEMBER void reflectRead(Reflector &r)
Reflect.
Definition: RSAKey.h:108
bool isPrivateKey() const
Is this a private key?
std::string getEStr() const
Get E as a hexadecimal number.
friend std::ostream & operator<<(std::ostream &stream, const RSAKey &key)
The '<<' operator for RSAKey.
RSAKey & operator=(const RSAKey &key)
The '=' operator.
RSAKey()
Default constructor.
bool operator!=(const RSAKey &key)
The '!=' operator.
void reflectWrite(Reflector &r)
Definition: RSAKey.h:117
virtual ~ RSAKey()
The destructor.
const OpenSSLRSAWrapper * getOpenSSLKey() const
Return a pointer to the OpenSSL RSA key wrapper.
Definition: RSAKey.h:165