-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathverifyrsa.h
35 lines (30 loc) · 863 Bytes
/
verifyrsa.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
30
31
32
33
34
35
// https://github.com/rodlie/verifyrsa
// BSD 3-Clause License
#ifndef VERIFYRSA_H
#define VERIFYRSA_H
#if defined(EXPORT_DLL)
#if defined(_WIN32)
#if defined(VerifyRSA_EXPORTS)
#define MYLIB_EXPORT __declspec(dllexport)
#else
#define MYLIB_EXPORT __declspec(dllimport)
#endif
#else
#define MYLIB_EXPORT
#endif
#else
#define MYLIB_EXPORT
#endif
#include <iostream>
class VerifyRSA
{
public:
static MYLIB_EXPORT char* sign(std::string privateKey,
std::string plainText);
static MYLIB_EXPORT bool verify(std::string publicKey,
std::string plainText,
char* signatureBase64);
static MYLIB_EXPORT bool generate(std::string key,
int bits = 2048);
};
#endif // VERIFYRSA_H