CryptoSys PKI Pro Manual

Cms.QueryEnvData Method

Query a CMS enveloped-data object file for selected information.

Syntax

[C#]
public static string QueryEnvData(
	string inputFile,
	string query
)
[VB.NET]
Public Shared Function QueryEnvData ( _
	inputFile As String, _
	query As String _
) As String

Parameters

inputFile
file containing CMS enveloped-data object
query
Query string (case insensitive)

Return Value

String containing the result or an empty string if not found or error.

Remarks

Valid queries are:

"version" envelopedData CMSVersion (edVer) value, e.g. "0".
"recipientInfoVersion" recipientInfo version (riVer) value.
"recipientInfoType" Type of recipientInfo, e.g. ktri, kari, ...
"CountOfRecipientInfos" Number of RecipientInfos included in the data.
"recipientIssuerName" Distinguished Name of recipient's certificate issuer.
"recipientSerialNumber" serialNumber of recipient's certificate in hex format
"keyEncryptionAlgorithm" keyEncryptionAlgorithm, e.g. "rsaEncryption".
"keyEncryptionFlags" Bit flags used for the key encryption algorithm (ktri only).
"SizeOfEncryptedKey" Size (in bytes) of the EncryptedKey.
"encryptedKey" EncryptedKey value encoded in hex.
"oaepParams" Parameters used for RSA-OAEP (if applicable).
"keyWrapAlgorithm" Key wrap algorithm, e.g. "aes128-wrap" (kari and kekri only).
"originatorKeyAlgorithm" OriginatorPublicKey algorithm, e.g. "ecPublicKey" (kari only).
"originatorPublicKey" OriginatorPublicKey publicKey value encoded in hex (kari only).
"keyid" keyIdentifier for KEKRecipientInfo (kekri) type.
"contentEncryptionAlgorithm" contentEncryptionAlgorithm, e.g. "des-EDE3-CBC".
"SizeOfEncryptedContent" Size (in bytes) of the EncryptedContent.
"encryptedContent" EncryptedContent encoded in hex.
"iv" Initialization vector encoded in hex.
By default, the function queries the first recipientInfo in the file. To query the Nth recipientInfo append "/N" to the query string, e.g. "recipientInfoVersion/2" to find the version number of the second recipientInfo in the file.

See Also

VB6/C equivalent: CMS_QueryEnvData

[Contents] [Index]

[PREV: Cms.MakeSigDataFromString Method (String, String, String, String, HashAlgorithm, Cms.SigDataOptions)...]   [Contents]   [Index]   
   [NEXT: Cms.QuerySigData Method...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.