Add Document Digest
Porpose of the "Add document digest" operation is to avoid file transfering (if there is extra security requirements) out of internal network.
Operation add signable file digest (HASH) and file name to the file processing session.
Only possible for signing ASICE (EDOC) document types.
1. The file digest and file name is attached to the file processing session;
2. The file description information is returned.
The Service provider's application sends the following GET request using TLS:
|String (64)||Mandatory||File processing session identifier|
The request must contain an Authorization header with an OAuth Introspect access token obtained via a Service provider's credentials grant flow.
|Array||Mandatory||File diggest and name array|
|String||Mandatory||The name of the file (with extension) from which the diggest was calculated|
|String||Mandatory||Calculated file digest in Base64 encoding. See note below.|
Signature sequence index, starting with "0", which means the first signature (XAdES signature file name signatures0.xml)
If Proprty is not used, signature index will be "0".
If there is planed that file will be signed by more then one signer, this parameter shall be used by incresing by 1 for each next signature. ASICE container can't contain more then one signature with same file name.
Otherwise, service provider shall rename signature file before adding it to ASICE container.
File diggest calculation
Only SHA256 at this moment is supported.
Fist calculate SHA256 HASH from the file you need to sign. Then take SHA256 HASH and make HEX to Base64 encoding. For example encoding you can use https://base64.guru/converter/encode/hex
Example with one file digest and name
Example with multiple file digest and name
|File Identifier (documentId)|
|File size in bytes (allways will be "0" since file name and digest was added)|