Query a CMS enveloped-data object file for selected information.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string QueryEnvData(
string inputFile,
string query
)
Public Shared Function QueryEnvData (
inputFile As String,
query As String
) As String
Parameters
- inputFile String
- file containing CMS enveloped-data object
- query String
- Query string (case insensitive)
Return Value
StringString containing the result or an empty string if not found or error.
RemarksValid 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