48 #ifndef _MIRA_RSASIGNATURE_H_ 49 #define _MIRA_RSASIGNATURE_H_ 102 template<
typename Reflector>
105 std::stringstream ss;
107 std::string str = ss.str();
111 template<
typename Reflector>
116 std::stringstream ss(str);
178 friend std::ostream&
operator<<(std::ostream& stream,
180 friend std::istream&
operator>>(std::istream& stream,
197 std::ostream&
operator<<(std::ostream& stream,
198 const RSASignature& signature);
205 std::istream&
operator>>(std::istream& stream,
206 RSASignature& signature);
210 template<
typename SerializerTag>
MIRA_SPLIT_REFLECT_MEMBER void reflectRead(Reflector &r)
Reflect.
Definition: RSASignature.h:103
Definition: RSASignature.h:75
size_t getSize() const
Return the size of the RSA signature.
Definition: RSASignature.h:136
virtual ~RSASignature()
The destructor.
Type trait that indicates whether a type should be serialized "transparently", i.e.
Definition: IsTransparentSerializable.h:81
Definition of a RSA key (public or private)
Definition: RSAKey.h:71
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
#define MIRA_SPLIT_REFLECT_MEMBER
Macro that insert a class member reflect() method just splitting reflection into a reflectRead() and ...
Definition: SplitReflect.h:209
void reflectWrite(Reflector &r)
Definition: RSASignature.h:112
Provides type trait that indicates whether a type should be serialized "transparently".
Provides MIRA_SPLIT_REFLECT macros.
RSASignature & operator=(const RSASignature &signature)
The '=' operator.
std::ostream & operator<<(std::ostream &s, const LibraryVersion &version)
std::istream & operator>>(std::istream &stream, RSAKey &key)
The '>>' operator for RSAKey.
Definition: RSASignature.h:74
Commonly used exception classes.
DigestType
The digest type.
Definition: RSASignature.h:73
RSASignature()
Default constructor.
const uint8 * getSignature() const
Return the signature in a binary format.
Definition: RSASignature.h:139
Definition: RSASignature.h:76
static bool verifyMessage(const RSAKey &iPublicKey, DigestType iDigestType, const char *iMsg, size_t iMsgLen, const RSASignature &iSignature)
Verify a message signature based on the public RSA of the sender.
friend std::ostream & operator<<(std::ostream &stream, const RSASignature &signature)
The '<<' operator for RSASignature.
Definition: RSASignature.h:77
A class for signing and verifying messages using a RSA key pair.
Definition: RSASignature.h:69
static RSASignature signMessage(const RSAKey &iPrivateKey, DigestType iDigestType, const char *iMsg, size_t iMsgLen)
Sign a message based on the private RSA key of the sender.
friend std::istream & operator>>(std::istream &stream, RSASignature &signature)
The '>>' operator for RSASignature.