Open blackkus opened 2 years ago
Something like this :
if(attr.type === forge.pki.oids.messageDigest) {
// use content message digest as value if not already set
if(!attr.value) {
attr.value = mds[signer.digestAlgorithm].digest();
}
}
Sometime you want to sign based on a Hash instead of a content (document). it means that you may not have the document, just the hash. Could it be possible to "digest" the content message only id "messageDigest" not provided :
https://github.com/digitalbazaar/forge/blob/c0bb359afca73bb0f3ba6feb3f93bbcb9166af2e/lib/pkcs7.js#L513