McAfee MEJCAE-AM-DA Product Guide - Page 80

Using the E-Business Server API, Library and header file organization

Page 80 highlights

EBS_PG_Encrypting and Decryptin 10 Using the E-Business Server API To make it simpler to call E-Business Server commands from other languages and to improve performance when commands are called repeatedly, a simple C language API for entering E-Business Server commands is included in this version of the software. The central function in the API imitates the command line, allowing E-Business Server commands normally issued from the command line to be called through the API. Four supporting functions for freeing allocated memory, translating returned error codes, and initializing and cleaning up the API are also provided. The E-Business Server API is supported on Windows and UNIX platforms. Library and header file organization The following header files are included in the E-Business Server API: • PGPeBiz.h. Contains function prototypes for the E-Business Server API. • PGPBase.h. Contains the basic data types used by the E-Business Server (and EBSsdk) APIs. • PGPPFLConfig.h. Platform-dependent data type configuration file. Versions for each supported platform are shipped with the E-Business Server API. The file appropriate for the user's platform will be installed. EBSsdk ships as shared libraries on all supported platforms. On all UNIX platforms except HP-UX, the E-Business Server API and EBSsdk shared libraries are named: • libEBSsdk.so • libEBSsdkNetwork.so • libEBSEngine.so The HP-UX versions of these files have ".sl" filename extensions. The Win32 version uses the EBSEngine.dll dynamic link library Note: The Windows version of the API includes an import library, EBSEngine.lib, which must be linked with your program to properly resolve functions exported from the EBSsdk DLLs. E-Business Server API functions The E-Business Server API provides these functions: • PGPeBizInit() • PGPeBizCleanUp() • PGPeBiz() • PGPeBizFree() • PGPeBizErrorString() In order to set up the proper environment for E-Business Server API calls, the PGPeBizInit() function must first be called before calling any other E-Business Server API functions. This creates a context of type PGPeBizContextRef that is used in subsequent E-Business Server API calls in the current process, including API calls from threads spawned from the current process. A corresponding call to PGPeBizCleanUp() must be made at some point to release the context. You can call PGPeBizInit() more than once in a process, provided you call PGPeBizCleanUp() to release the current context before you create a new one. The syntax and parameters for each of the E-Business Server API functions are described below. E-Business Server™ 8.6 Product Guide 78

  • 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
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188

E-Business Server
8.6
Product Guide
78
10
Using the E-Business Server API
To make it simpler to call E-Business Server commands from other languages and to improve performance
when commands are called repeatedly, a simple
C
language API for entering E-Business Server commands
is included in this version of the software. The central function in the API imitates the command line, allowing
E-Business Server commands normally issued from the command line to be called through the API. Four
supporting functions for freeing allocated memory, translating returned error codes, and initializing and
cleaning up the API are also provided.
The E-Business Server API is supported on Windows and UNIX platforms.
Library and header file organization
The following header files are included in the E-Business Server API:
PGPeBiz.h
. Contains function prototypes for the E-Business Server API.
PGPBase.h
. Contains the basic data types used by the E-Business Server (and EBSsdk) APIs.
PGPPFLConfig.h
. Platform-dependent data type configuration file. Versions for each supported platform are
shipped with the E-Business Server API. The file appropriate for the user’s platform will be installed.
EBSsdk ships as shared libraries on all supported platforms. On all UNIX platforms except HP-UX, the
E-Business Server API and EBSsdk shared libraries are named:
• libEBSsdk.so
• libEBSsdkNetwork.so
• libEBSEngine.so
The HP-UX versions of these files have “.sl” filename extensions. The Win32 version uses the
EBSEngine.dll
dynamic link library
Note:
The Windows version of the API includes an import library,
EBSEngine.lib
, which must be linked with your program
to properly resolve functions exported from the EBSsdk DLLs.
E-Business Server API functions
The E-Business Server API provides these functions:
• PGPeBizInit()
• PGPeBizCleanUp()
• PGPeBiz()
• PGPeBizFree()
• PGPeBizErrorString()
In order to set up the proper environment for E-Business Server API calls, the
PGPeBizInit()
function must
first be called before calling any other E-Business Server API functions. This creates a context of type
PGPeBizContextRef
that is used in subsequent E-Business Server API calls in the current process, including
API calls from threads spawned from the current process.
A corresponding call to
PGPeBizCleanUp()
must be made at some point to release the context. You can call
PGPeBizInit()
more than once in a process, provided you call PGPeBizCleanUp() to release the current
context before you create a new one.
The syntax and parameters for each of the E-Business Server API functions are described below.
EBS_PG_Encrypting and Decryptin