CryptoSys PKI Pro Manual

Cms.ReadEnvDataToFile Method

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

Syntax

[C#]
public static int ReadEnvDataToFile(
   string outputFile,
   string inputFile,
   string x509File,
   string privateKey,
   Cms.ReadOptions opts = Cms.ReadOptions.None 
)
[VB]
Public Shared Function ReadEnvDataToFile (
   outputFile As String,
   inputFile As String,
   x509File As String,
   privateKey As String,
   Optional opts As Cms.ReadOptions = Cms.ReadOptions.None 
) As Integer

Parameters

outputFile  String
Name of output file to be created.
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.
opts  Cms.ReadOptions  (Optional)
Use Cms.ReadOptions for faster handling of large files (binary only).

Return Value

Int32
Zero if successful; otherwise it returns an error code.

See Also

VB6/C equivalent: CMS_ReadEnvData

[Contents] [Index]

[PREV: Cms.ReadEnvDataToBytes Method...]   [Contents]   [Index]   
   [NEXT: Cms.ReadEnvDataToString Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.