CryptoSys PKI Pro Manual

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

Create a CMS enveloped-data object from an ASCII string (advanced options).

Syntax

[C#]
public static int MakeEnvDataFromString(
	string outputFile,
	string inputData,
	string certList,
	CipherAlgorithm cipherAlg,
	Cms.KeyEncrAlgorithm keyEncrAlg,
	HashAlgorithm hashAlg,
	Cms.EnvDataOptions advOptions
)
[VB.NET]
Public Shared Function MakeEnvDataFromString ( _
	outputFile As String, _
	inputData 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
inputData
Input data string, expected plain ASCII text.
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 negative error code

Examples (VB.NET)

See Example1

See Also

VB6/C equivalent: CMS_MakeEnvDataFromString

[Contents] [Index]

[PREV: Cms.MakeEnvDataFromString Method (String, String, String, CipherAlgorithm, Cms.EnvDataOptions)...]   [Contents]   [Index]   
   [NEXT: Cms.MakeSigData Method (String, String, String, String, Cms.SigAlg, Cms.SigDataOptions)...]

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