CryptoSys PKI Pro Manual

Cms.MakeEnvData Method (String, String, String, CipherAlgorithm, Cms.KeyEncrAlgorithm, HashAlgorithm, Cms.EnvDataOptions)

Create a CMS enveloped-data object for one or more recipients using their x.509 certificates (advanced options).

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
Name of output file to be created.
inputFile
Input data file.
certList
List of recipient X.509 certificate filename(s), separated by semi-colons (;). Alternatively, specify a single PKCS#7 certificate chain file (.p7c/.p7b).
cipherAlg
Type: CipherAlgorithm
Content encryption algorithm [default=Triple DES].
keyEncrAlg
Type: Cms.KeyEncrAlgorithm
Key encryption algorithm [default=rsaEncryption].
hashAlg
Type: HashAlgorithm
Encoding hash algorithm, if required [default=SHA-1].
advOptions
Type: Cms.EnvDataOptions
Advanced options. See Cms.EnvDataOptions.

Return Value

Number of successful recipients or a negative error code.

Examples (VB.NET)

See Example1

See Also

VB6/C equivalent: CMS_MakeEnvData

[Contents] [Index]

[PREV: Cms.MakeEnvData Method (String, String, String, CipherAlgorithm, Cms.EnvDataOptions)...]   [Contents]   [Index]   
   [NEXT: Cms.MakeEnvDataFromBytes Method...]

Copyright © 2004-22 D.I. Management Services Pty Ltd. All rights reserved. Generated 2022-06-30T12:18:44Z.