cmsMakeEnvDataFromBytes
Create a CMS enveloped-data object from data in a byte array.
Syntax
[VBA]
Public Function cmsMakeEnvDataFromBytes ( _
szFileOut As String, _
lpInput() As Byte, _
szCertList As String, _
Optional szKeyString As String = "", _
Optional nOptions As Long = 0, _
Optional nCount As Long = 0 _
) As Long
Parameters
- szFileOut
- Name of output file to be created.
- lpInput
- Input data.
- szCertList
- List of one or more recipient X.509 certificate filenames, separated by semicolons (;).
A certificate's representation in base64 or as a PEM string may be used instead of a filename.
Alternatively, specify a single PKCS#7 certificate chain file (.p7c/.p7b).
Special cases: Set as "type=@pwri"
to create a single recipientInfo of the PasswordRecipientInfo
(pwri) type;
or set as "type=@kekri,keyid=<string>"
to create a single recipientInfo of the KEKRecipientInfo
(kekri) type. See Remarks.
- szKeyString
- (formerly szSeed) Use to pass optional additional user key material (ukm) for KDF where KeyAgreement (kari) type is used.
Or use to pass the password for a pwri type or the key encryption key (KEK) for a kekri type.
Either pass a plain ASCII string, e.g. "abc" or use the format
"#x<hex-digits>"
to pass a string of arbitrary octet values,
e.g. "#xdeadbeef01"
to pass the 5 bytes 0xde,0xad,0xbe,0xef,0x01
. Required for pwri and kekri types.
- nOptions
- See the options in cmsMakeEnvData.
- nCount
- Use to pass the iteration count for a pwri type (default=4096) or tag length for AuthEnvelopedData (in range 12-16, default=16). Otherwise ignored.
Return Value
Long: Number of successful recipients or a negative error code.
Remarks