Function

CMSDecoderUpdateMessage(_:_:_:)

Feeds raw bytes of the message to be decoded into the decoder.

Declaration

func CMSDecoderUpdateMessage(_ cmsDecoder: CMSDecoder, _ msgBytes: UnsafeRawPointer, _ msgBytesLen: Int) -> OSStatus

Parameters

cmsDecoder

The CMSDecoder reference returned by the CMSDecoderCreate function.

msgBytes

A pointer to the data to be decoded.

msgBytesLen

The length of the data, in bytes.

Return Value

A result code. See Security Framework Result Codes. Returns errSecUnknownFormat upon detection of an improperly formatted CMS message.

Discussion

This function can be called multiple times. Call the CMSDecoderFinalizeMessage function when you have no more data to decode.

See Also

Decoding

func CMSDecoderFinalizeMessage(CMSDecoder) -> OSStatus

Indicates that there is no more data to decode.

func CMSDecoderSetDetachedContent(CMSDecoder, CFData) -> OSStatus

Specifies the message’s detached content, if any.

func CMSDecoderCopyDetachedContent(CMSDecoder, UnsafeMutablePointer<CFData?>) -> OSStatus

Obtains the detached content specified with the CMSDecoderSetDetachedContent function.