-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jwt.pas
114 lines (74 loc) · 4.45 KB
/
Jwt.pas
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
unit Jwt;
interface
type
HCkJwt = Pointer;
HCkPrivateKey = Pointer;
HCkPublicKey = Pointer;
HCkString = Pointer;
function CkJwt_Create: HCkJwt; stdcall;
procedure CkJwt_Dispose(handle: HCkJwt); stdcall;
function CkJwt_getAutoCompact(objHandle: HCkJwt): wordbool; stdcall;
procedure CkJwt_putAutoCompact(objHandle: HCkJwt; newPropVal: wordbool); stdcall;
procedure CkJwt_getDebugLogFilePath(objHandle: HCkJwt; outPropVal: HCkString); stdcall;
procedure CkJwt_putDebugLogFilePath(objHandle: HCkJwt; newPropVal: PWideChar); stdcall;
function CkJwt__debugLogFilePath(objHandle: HCkJwt): PWideChar; stdcall;
procedure CkJwt_getLastErrorHtml(objHandle: HCkJwt; outPropVal: HCkString); stdcall;
function CkJwt__lastErrorHtml(objHandle: HCkJwt): PWideChar; stdcall;
procedure CkJwt_getLastErrorText(objHandle: HCkJwt; outPropVal: HCkString); stdcall;
function CkJwt__lastErrorText(objHandle: HCkJwt): PWideChar; stdcall;
procedure CkJwt_getLastErrorXml(objHandle: HCkJwt; outPropVal: HCkString); stdcall;
function CkJwt__lastErrorXml(objHandle: HCkJwt): PWideChar; stdcall;
function CkJwt_getLastMethodSuccess(objHandle: HCkJwt): wordbool; stdcall;
procedure CkJwt_putLastMethodSuccess(objHandle: HCkJwt; newPropVal: wordbool); stdcall;
function CkJwt_getVerboseLogging(objHandle: HCkJwt): wordbool; stdcall;
procedure CkJwt_putVerboseLogging(objHandle: HCkJwt; newPropVal: wordbool); stdcall;
procedure CkJwt_getVersion(objHandle: HCkJwt; outPropVal: HCkString); stdcall;
function CkJwt__version(objHandle: HCkJwt): PWideChar; stdcall;
function CkJwt_CreateJwt(objHandle: HCkJwt; header: PWideChar; payload: PWideChar; password: PWideChar; outStr: HCkString): wordbool; stdcall;
function CkJwt__createJwt(objHandle: HCkJwt; header: PWideChar; payload: PWideChar; password: PWideChar): PWideChar; stdcall;
function CkJwt_CreateJwtPk(objHandle: HCkJwt; header: PWideChar; payload: PWideChar; key: HCkPrivateKey; outStr: HCkString): wordbool; stdcall;
function CkJwt__createJwtPk(objHandle: HCkJwt; header: PWideChar; payload: PWideChar; key: HCkPrivateKey): PWideChar; stdcall;
function CkJwt_GenNumericDate(objHandle: HCkJwt; numSecOffset: Integer): Integer; stdcall;
function CkJwt_GetHeader(objHandle: HCkJwt; token: PWideChar; outStr: HCkString): wordbool; stdcall;
function CkJwt__getHeader(objHandle: HCkJwt; token: PWideChar): PWideChar; stdcall;
function CkJwt_GetPayload(objHandle: HCkJwt; token: PWideChar; outStr: HCkString): wordbool; stdcall;
function CkJwt__getPayload(objHandle: HCkJwt; token: PWideChar): PWideChar; stdcall;
function CkJwt_IsTimeValid(objHandle: HCkJwt; jwt: PWideChar; leeway: Integer): wordbool; stdcall;
function CkJwt_SaveLastError(objHandle: HCkJwt; path: PWideChar): wordbool; stdcall;
function CkJwt_VerifyJwt(objHandle: HCkJwt; token: PWideChar; password: PWideChar): wordbool; stdcall;
function CkJwt_VerifyJwtPk(objHandle: HCkJwt; token: PWideChar; key: HCkPublicKey): wordbool; stdcall;
implementation
{$Include chilkatDllPath.inc}
function CkJwt_Create; external DLLName;
procedure CkJwt_Dispose; external DLLName;
function CkJwt_getAutoCompact; external DLLName;
procedure CkJwt_putAutoCompact; external DLLName;
procedure CkJwt_getDebugLogFilePath; external DLLName;
procedure CkJwt_putDebugLogFilePath; external DLLName;
function CkJwt__debugLogFilePath; external DLLName;
procedure CkJwt_getLastErrorHtml; external DLLName;
function CkJwt__lastErrorHtml; external DLLName;
procedure CkJwt_getLastErrorText; external DLLName;
function CkJwt__lastErrorText; external DLLName;
procedure CkJwt_getLastErrorXml; external DLLName;
function CkJwt__lastErrorXml; external DLLName;
function CkJwt_getLastMethodSuccess; external DLLName;
procedure CkJwt_putLastMethodSuccess; external DLLName;
function CkJwt_getVerboseLogging; external DLLName;
procedure CkJwt_putVerboseLogging; external DLLName;
procedure CkJwt_getVersion; external DLLName;
function CkJwt__version; external DLLName;
function CkJwt_CreateJwt; external DLLName;
function CkJwt__createJwt; external DLLName;
function CkJwt_CreateJwtPk; external DLLName;
function CkJwt__createJwtPk; external DLLName;
function CkJwt_GenNumericDate; external DLLName;
function CkJwt_GetHeader; external DLLName;
function CkJwt__getHeader; external DLLName;
function CkJwt_GetPayload; external DLLName;
function CkJwt__getPayload; external DLLName;
function CkJwt_IsTimeValid; external DLLName;
function CkJwt_SaveLastError; external DLLName;
function CkJwt_VerifyJwt; external DLLName;
function CkJwt_VerifyJwtPk; external DLLName;
end.