secFile

Declaration

function secFile(const sPubKey1, sPrivKey2, sFileName: WideString): WordBool; safecall;

Description

This function allows to seal a file and encrypt biodata with asymmetric encryption algorithm. It works the same way as pressing "Seal" button in eSignatureOffice window.
The algorithm type and key length used to encrypt the data is specified by encryption keys.
Hash function used together with encryption is specified by eSignatureOffice settings. secFile reads this setting from Program.ini file, located in the same folder where SOSigOffice.exe is. Path to this folder should be set in registry key as described in the Installation section.

Arguments

sPubKey1 - Path to the public key file used to encrypt biodata;
sPubKey1 - Path to the private key file used to create digital seal;
sFileName - Path to the file that must be secured.

Return Values

Function returns True on success, False on error.