CryptoSys PKI Pro Manual

Cms.GetSigHashAlgorithm Method

Find ID of message digest hash algorithm used to make signature.

Syntax

[C#]
public static int GetSigHashAlgorithm(
	string inputFile,
	string certFile
)
[VB.NET]
Public Shared Function GetSigHashAlgorithm ( _
	inputFile As String, _
	certFile As String _
) As Integer

Parameters

inputFile
name of file containing CMS signed-data object
certFile
an (optional) X.509 certificate file to be used to identify the signer

Return Value

0=SHA-1, 1=MD5, 2=MD2, 3=SHA-256, 4=SHA-384, 5=SHA-512, 6=SHA-224; or a negative error code

Remarks

This 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)

[Contents] [Index]

[PREV: Cms.GetSigDataDigest Method...]   [Contents]   [Index]   
   [NEXT: Cms.MakeComprData Method...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.