CMS_MakeSigDataFromString is identical to
CMS_MakeSigData
except the input is passed as a string instead of in a file.
Public Declare Function CMS_MakeSigDataFromString Lib "diCrPKI.dll"
(ByVal strFileOut As String, ByVal strDataIn As String,
ByVal strCertList As String, ByVal strPrivateKey As String, ByVal nOptions As Long) As Long
nRet = CMS_MakeSigDataFromString(strFileOut, strDataIn,
strCertList, strPrivateKey, nOptions) As Long
long _stdcall CMS_MakeSigDataFromString(const char *szFileOut, const char *szDataIn,
const char *szCertList, const char *szRSAPrivateKey, long nOptions);
Long: If successful, the return value is zero;
otherwise it returns a non-zero error code. Further error information may be available by calling
PKI_LastError.
Cms.MakeSigDataFromString Method
Zero-terminated ANSI data is expected in strDataIn.
In Visual Basic, the string strDataIn must not contain a NUL (Chr$(0)) character.
To sign a messsage that contains binary or Unicode UTF-16 data, store in a file and use
CMS_MakeSigData.
nRet = CMS_MakeSigDataFromString(strOutputFile, "This is some sample content.", _
strCertFile, strPrivateKey, 0)
CMS_MakeSigData CMS_MakeDetachedSig