CMSEncoderSetHasDetachedContent(_:_:)
Specifies whether the signed data is to be separate from the message.
Declaration
func CMSEncoderSetHasDetachedContent(_ cmsEncoder: CMSEncoder, _ detachedContent: Bool) -> OSStatusParameters
- cmsEncoder:
The CMSEncoder reference returned by the Cmsencodercreate(_:) function.
- detachedContent:
TRUEif the message should exclude the data to be signed. Prior to calling this function, the encoder defaults toFALSEfor this setting, indicating that the message contains the data to be signed.
Return Value
A result code. See Security Framework Result Codes.
Discussion
A signed CMS message can optionally be sent separately from the signed data. Set detachedContent to TRUE to indicate that the signed data is to be kept separate from the message.
Encrypted messages, including those that are also signed, cannot use detached content.
If you do call this function, you must call it before the first call to the CMSEncoderUpdateContent(_:_:_:) function.