cmsReadEnvDataToString
Read and decrypt a CMS enveloped-data object to a string.
Syntax
[VBA]
Public Function cmsReadEnvDataToString ( _
szFileIn As String, _
szCertFile As String, _
szPrivateKey As String, _
Optional nOptions As Long = 0 _
) As String
Parameters
- szFileIn
- Name of file containing CMS enveloped-data object (binary or base64-encoded) or the data as a base64 or PEM string.
- szCertFile
- Filename of the recipient's X.509 certificate (optional).
- szPrivateKey
- Internal representation of private key.
- nOptions
- For future use.
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 cmsReadEnvDataToBytes()
.