User bio
404 bio not found
Member since Dec 14, 2023
Replies:

Here is a sample code

$$$ThrowOnError(tUtils.CreateCMSStream(tContent,tCertFileName, tKeyFileName, tPassPhrase, .tStream)) //the stream is initialized in CreateCMSStream
     zwrite tStream
     set tStream.Filename = "C:\Users\sdevin\Documents\DEV\iris-pkcs7-util\misc\out\test.cms"
     set tsc = tStream.%Save()
     zw tsc
     zw tsc2
     zwrite tStream

And here is where I create the stream

Method ConvertStringToStream(pString, Output pStream As %Stream.FileBinary) As %Status
{
     set pStream = ##class(%Stream.FileBinary).%New()
     do pStream.Write(pString)
     do pStream.Rewind()
     return pStream
}

convertStreamToString is the last instruction of CreateCMSStream

Certifications & Credly badges:
Stephane has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Stephane has no followers yet.
Following: