Click or drag to resize

CmsReadEnvDataToString Method

Read and decrypt a CMS enveloped-data object to a string.

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static string ReadEnvDataToString(
	string inputFile,
	string x509File,
	string privateKey
)

Parameters

inputFile  String
Name of file containing CMS enveloped-data object (binary or base64-encoded) or the data as a base64 or PEM string.
x509File  String
(optional) filename of the recipient's X.509 certificate
privateKey  String
Internal representation of private key.

Return Value

String
Decrypted content in a string or empty string on error.
Remarks
Use this only when the decrypted text is known to be plain ASCII text, otherwise use ReadEnvDataToBytes.
See Also