Add Document Digest
Purpose 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 filename 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.
|Mandatory||File digest and name array|
|Mandatory||The name of the file (with extension) from which the diggest was calculated|
|Mandatory||Calculated file digest in Base64 encoding. See note below.|
|Mandatory||Used HASH Algorithm (Only SHA256 is supported)|
Signature sequence index, starting with "0", which means the first signature (XAdES signature file name signatures0.xml)
If Property is not used, signature index will be "0".
If there is planed that file will be signed by more than one signer, this parameter shall be used by increasing 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 (always will be "0" since filename and digest was added)|
Processed file type:
"hash" - In case if file digest and file name is added to session