Portuguese eID Middleware SDK
Version: 3.12.0
|
#include <eidlib.h>
Public Member Functions | |
virtual PTEIDSDK_API PTEID_ByteArray | Sign (const PTEID_ByteArray &data, bool signatureKey=false)=0 |
virtual PTEIDSDK_API PTEID_ByteArray | SignSHA256 (const PTEID_ByteArray &data, bool signatureKey=false)=0 |
virtual PTEIDSDK_API PTEID_ByteArray | SignXades (const char *output_path, const char *const *paths, unsigned int n_paths, PTEID_SignatureLevel level=PTEID_LEVEL_BASIC)=0 |
virtual PTEIDSDK_API PTEID_ByteArray | SignXadesT (const char *output_path, const char *const *paths, unsigned int n_paths)=0 |
virtual PTEIDSDK_API PTEID_ByteArray | SignXadesA (const char *output_path, const char *const *paths, unsigned int n_paths)=0 |
virtual PTEIDSDK_API void | SignXadesIndividual (const char *output_path, const char *const *paths, unsigned int n_paths)=0 |
virtual PTEIDSDK_API void | SignXadesTIndividual (const char *output_path, const char *const *paths, unsigned int n_paths)=0 |
virtual PTEIDSDK_API void | SignXadesAIndividual (const char *output_path, const char *const *paths, unsigned int n_paths)=0 |
virtual PTEIDSDK_API int | SignPDF (PTEID_PDFSignature &sig_handler, int page, int page_sector, bool is_landscape, const char *location, const char *reason, const char *outfile_path)=0 |
virtual PTEIDSDK_API int | SignPDF (PTEID_PDFSignature &sig_handler, int page, double coord_x, double coord_y, const char *location, const char *reason, const char *outfile_path)=0 |
virtual PTEIDSDK_API PTEID_Certificates & | getCertificates ()=0 |
virtual PTEIDSDK_API PTEID_Certificate & | getCert (PTEID_CertifType type)=0 |
virtual PTEIDSDK_API PTEID_Certificate & | getRoot ()=0 |
virtual PTEIDSDK_API PTEID_Certificate & | getCA ()=0 |
virtual PTEIDSDK_API PTEID_Certificate & | getSignature ()=0 |
virtual PTEIDSDK_API PTEID_Certificate & | getAuthentication ()=0 |
virtual PTEIDSDK_API PTEID_SigningDeviceType | getDeviceType ()=0 |
Interface class for objects with Signing capabilities.
|
pure virtual |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Get type of SigningDeviceType.
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Raw RSA signature with PCKS #1 padding.
data | holds the data to be signed, at most 32 bytes. This data should be hashed using sha256. |
signatureKey | whether to use the 'Signature key'. By default, it uses the 'Authentication private key'. To sign with the 'Signature private key' set the parameter signatureKey to true. |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
PDF Signature with location by page sector (the portrait A4 page is split into 18 cells: 6 lines and 3 columns) If PTEID_Exception(EIDMW_TIMESTAMP_ERROR) is thrown, the resulting file is a PAdES-B signature. If PTEID_Exception(EIDMW_LTV_ERROR) is thrown, the resulting file is a PAdES-LT or PAdES-LTA depending where the timestamping fails.
sig_handler | this defines the input file and some signature options |
page | in case of visible signature it defines the page where the signature will appear |
page_sector | position in the signature grid, between 1 to 18 for Portrait documents and 1 to 20 for Landscape ones |
is_landscape | is unused parameter, the SDK now detects document orientation automatically |
location | Signature metadata field |
reason | Signature metadata field |
outfile_path | Native Filesystem path of the ouput file |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
PDF Signature with location by coordinates (expressed in percentage of page height/width). The coordinate system has its origin in the top left corner of the page If PTEID_Exception(EIDMW_TIMESTAMP_ERROR) is thrown, the resulting file is a PAdES-B signature. If PTEID_Exception(EIDMW_LTV_ERROR) is thrown, the resulting file is a PAdES-LT or PAdES-LTA depending where the timestamping fails.
sig_handler | this defines the input file and some signature options |
page | in case of visible signature it defines the page where the signature will appear |
coord_x | X coordinate of the signature location (percentage of page width) |
coord_y | Y coordinate of the signature location (percentage of page height) |
location | Location field in the added signature metadata |
reason | Signature metadata field |
outfile_path | Native Filesystem path of the ouput file |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Raw RSA signature with PCKS #1 padding (applied to a SHA256 hash).
data | holds the data to be signed, it should be 32 bytes. |
signatureKey | whether to use the 'Signature key'. By default, it uses the 'Authentication private key'. To sign with the 'Signature private key' set the parameter signatureKey to true. |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Produce a XAdES Signature of the files indicated by the parameter paths and stores the results in one ASiC container in a zip format. The location of the resulting ASiC container is indicated by the parameter output_path.
paths | is an array of null-terminated strings representing absolute paths in the local filesystem. Those files content (hashed with SHA-256 algorithm) will be the input data for the RSA signature |
n_paths | is the number of elements in the paths array |
output_path | points to the resulting container |
level | is an enum used to set the XAdES signature level/profile: XAdES-B (PTEID_LEVEL_BASIC), XAdES-T (PTEID_LEVEL_T), XAdES-LTA (PTEID_LEVEL_LTV). Note: Setting parameter level to PTEID_LEVEL_LT will throw PTEID_Exception(EIDMW_ERR_PARAM_BAD), as it is not supported yet. |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Produce a XAdES-LTA Signature of the files indicated by the parameter paths and stores the results in one ASiC container in a zip format. The location of the resulting ASiC container is indicated by the parameter output_path. If PTEID_Exception(EIDMW_TIMESTAMP_ERROR) is thrown, the resulting file is a XAdES-B signature. If PTEID_Exception(EIDMW_LTV_ERROR) is thrown, the resulting file is a XAdES-LT or XAdES-LTA depending where the timestamping fails.
paths | is an array of null-terminated strings representing absolute paths in the local filesystem. Those files content (hashed with SHA-256 algorithm) will be the input data for the RSA signature |
n_paths | is the number of elements in the paths array |
output_path | points to the resulting container |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Produce XAdES-A Signatures of the files indicated by the parameter paths and stores each of the results in an individual ASiC container in a zip format. If PTEID_Exception(EIDMW_TIMESTAMP_ERROR) is thrown, the resulting file is a XAdES-B signature. If PTEID_Exception(EIDMW_LTV_ERROR) is thrown, the resulting file is a XAdES-LT or XAdES-LTA depending where the timestamping fails.
paths | is an array of null-terminated strings representing absolute paths in the local filesystem. Those files content (hashed with SHA-256 algorithm) will be the input data for the RSA signature |
n_paths | is the number of elements in the paths array |
output_path | directory of the created ASiC containers |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Produce XAdES-B Signatures of the files indicated by the parameter paths and stores each of the results in an individual ASiC container in a zip format.
paths | is an array of null-terminated strings representing absolute paths in the local filesystem. Those files content (hashed with SHA-256 algorithm) will be the input data for the RSA signature |
n_paths | is the number of elements in the paths array |
output_path | directory of the created ASiC containers |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Produce a XAdES-T Signature of the files indicated by the parameter paths and stores the results in one ASiC container in a zip format. The location of the resulting ASiC container is indicated by the parameter output_path. If PTEID_Exception(EIDMW_TIMESTAMP_ERROR) is thrown, the resulting file is a XAdES-B signature.
paths | is an array of null-terminated strings representing absolute paths in the local filesystem. Those files content (hashed with SHA-256 algorithm) will be the input data for the RSA signature |
n_paths | is the number of elements in the paths array |
output_path | points to the resulting container |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.
|
pure virtual |
Produce XAdES-T Signatures of the files indicated by the parameter paths and stores each of the results in an individual ASiC container in a zip format. If PTEID_Exception(EIDMW_TIMESTAMP_ERROR) is thrown, the resulting file is a XAdES-B signature.
paths | is an array of null-terminated strings representing absolute paths in the local filesystem. Those files content (hashed with SHA-256 algorithm) will be the input data for the RSA signature |
n_paths | is the number of elements in the paths array |
output_path | directory of the created ASiC containers |
Implemented in eIDMW::PTEID_CMDSignatureClient, and eIDMW::PTEID_Card.