CmsGetSigHashAlgorithm Method |
Find ID of message digest hash algorithm used to make signature.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static int GetSigHashAlgorithm(
string inputFile,
string certFile
)
Public Shared Function GetSigHashAlgorithm (
inputFile As String,
certFile As String
) As Integer
Parameters
- inputFile String
- name of file containing CMS signed-data object
- certFile String
- an (optional) X.509 certificate file to be used to identify the signer
Return Value
Int320=SHA-1, 1=MD5, 2=MD2, 3=SHA-256, 4=SHA-384, 5=SHA-512, 6=SHA-224; or a negative
error code
RemarksThis method returns an integer ID number.
Alternatively, use
Cms.QuerySigData(inputFile, "digestAlgorithm")
to get the name directly as a string, e.g.
"sha1".
See
QuerySigData(String, String)
See Also