Click or drag to resize

CmsReadSigDataToBytes Method

Read the content from a CMS signed-data object directly into a byte array.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static byte[] ReadSigDataToBytes(
	string inputFile
)

Parameters

inputFile  String
Name of file containing CMS signed-data object (binary or base64-encoded) or the data as a base64 or PEM string.

Return Value

Byte
Byte array containing the content or a zero-length array if error.
Remarks
Use this if the content contains non-ASCII characters, e.g. UTF-8 encoded.
Example
C#
// Read in content to a byte array
byte[] b = Cms.ReadSigDataToBytes(inputFile);
// Convert to a .NET string (assumed UTF-8 encoded)
string s = System.Text.Encoding.UTF8.GetString(b);
See Also