Step 4: Hash Signing

The request signs one or more previously authorized document hashes using the specified credential and signature algorithm.

HTTP Request

POST {{csc_base_url}}/signatures/signHash
 
Authorization: Bearer {{access_token}}
Accept: application/json
Content-Type: application/json
 
{
"credentialID": "{{credential_id}}",
"hashes": ["{{hash_base64}}"],
"hashAlgorithmOID": "{{hash_algorithm_oid}}",
"signAlgo": "{{signature_algorithm_oid}}"
}

Input Parameters

ParameterLocationRequiredType / FormatDescription
AuthorizationHeaderYesAccess token (Bearer token)The access_token issued specifically for this signing operation.
credentialIDJSON bodyYesStringThe same credential that was specified in the signing PAR.
hashesJSON bodyYesArray of Base64 StringThe authorized document hashes in the same order as they are to be signed.
hashAlgorithmOIDJSON bodyYesOID stringHash algorithm; SHA-384: 2.16.840.1.101.3.4.2.2
signAlgoJSON bodyYesOID stringA signing algorithm permitted by the credential; ECDSA/SHA-384: 1.2.840.10045.4.3.3

Response Example

{
"signatures": [
"<Base64-encoded-ECDSA-signature>"
]
}

Response Parameters and Validation

ParameterTypeDescriptionIntegrator Validation
signaturesArray of StringBase64-encoded cryptographic signaturesThe number of returned signatures must match the number of hashes. Each value must be valid Base64. The integrator must cryptographically verify each signature using the public key of the certificate returned by credentials/info and the original document hash. The verified signature can then be embedded into a PAdES, XAdES, or CAdES signature container
ℹ️

Signature verification

The integrator must cryptographically verify the received signature using the public key of the certificate returned by credentials/info and the original document hash. After successful verification, the signature can be embedded into a PAdES, XAdES, or CAdES signature container.


Did this page help you?