-
Notifications
You must be signed in to change notification settings - Fork 1
/
Signature.h
60 lines (53 loc) · 958 Bytes
/
Signature.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include "Definitions.h"
#include <string>
#include <map>
struct Seal
{
ST_Loc *baseLoc = nullptr;
};
struct Signature;
struct StampAnnot
{
Signature *fromSignature;
std::string id;
ST_RefID pageRef;
//int pageIndex;
ST_Box *boundary = nullptr;
ST_Box *clip = nullptr;
};
struct References
{
enum CHECKMETHOD
{
MD5, SHA1, SM3
};
CHECKMETHOD checkMethod = MD5;
std::map<ST_Loc*, std::string> *references = nullptr;
};
struct Provider
{
std::string providerName;
std::string version;
std::string company;
};
struct SignedInfo
{
Provider *provider = nullptr;
std::string signatureMethod;
std::string signatureDateTime;
References *references = nullptr;
std::vector<StampAnnot *> stampAnnots;
Seal *seal = nullptr;
};
struct SignedValue
{
size_t len;
unsigned char *val = nullptr;
};
struct Signature
{
Document *fromDoc = nullptr;
SignedInfo *signedInfo = nullptr;
std::pair<ST_Loc*, SignedValue*> signedValue;
};