You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
599 B
31 lines
599 B
4 years ago
|
|
||
|
|
||
|
#ifndef SDK_CXX_SIGN_H
|
||
|
#define SDK_CXX_SIGN_H
|
||
|
|
||
|
#include <map>
|
||
|
#include <iostream>
|
||
|
|
||
|
#include <openssl/objects.h>
|
||
|
#include <openssl/rsa.h>
|
||
|
#include <openssl/pem.h>
|
||
|
#include <openssl/bio.h>
|
||
|
#include <openssl/err.h>
|
||
|
#include <string>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
namespace signutil {
|
||
|
|
||
|
string createSign(map<string, string> params, const string& privateKeyFilepath, const string& signType);
|
||
|
|
||
|
string sign(const string& content, const string& privateKeyFilepath, const string& hash);
|
||
|
|
||
|
string getSignContent(map<string, string> params);
|
||
|
|
||
|
void ERR(const string &msg);
|
||
|
}
|
||
|
|
||
|
|
||
|
#endif //SDK_CXX_SIGN_H
|