CryptoSys PKI Toolkit Manual
Cms.MakeEnvData Method (String, String, String, CipherAlgorithm, Cms.KeyEncrAlgorithm, HashAlgorithm, Cms.EnvDataOptions)
Creates an encrypted CMS enveloped-data object for one or more recipients using their x.509 certificates (advanced algorithms).
Syntax
[C#]
public static int MakeEnvData(
string outputFile,
string inputFile,
string certList,
CipherAlgorithm cipherAlg,
Cms.KeyEncrAlgorithm keyEncrAlg,
HashAlgorithm hashAlg,
Cms.EnvDataOptions advOptions
)
[VB.NET]
Public Shared Function MakeEnvData ( _
outputFile As String, _
inputFile As String, _
certList As String, _
cipherAlg As CipherAlgorithm, _
keyEncrAlg As Cms.KeyEncrAlgorithm, _
hashAlg As HashAlgorithm, _
advOptions As Cms.EnvDataOptions _
) As Integer
Parameters
- outputFile
- Output file to be created
- inputFile
- Input data file
- certList
- List of X509 certificate filename(s), separated by semi-colons
- cipherAlg
- Type: CipherAlgorithm
Content encryption algorithm [default=Triple DES]
- keyEncrAlg
- Type: Cms.KeyEncrAlgorithm
Key encryption algorithm [default=rsaEncryption]
- hashAlg
- Type: HashAlgorithm
Hash algorithm used in KDF [ignored - for future use]
- advOptions
- Type: Cms.EnvDataOptions
Advanced options. See Cms.EnvDataOptions.
Return Value
Number of successful recipients or a negative
error code.
Remarks
As of v3.7, it is an error if any specified certificate file in certList is missing or corrupted.
Examples (VB.NET)
See
Example1
See Also
VB6/C equivalent: CMS_MakeEnvData
[Contents] [Index]