---
title: "CMSDecoderCreate(_:)"
framework: security
role: symbol
role_heading: Function
path: "security/cmsdecodercreate(_:)"
---

# CMSDecoderCreate(_:)

Creates a CMSDecoder reference.

## Declaration

```swift
func CMSDecoderCreate(_ cmsDecoderOut: UnsafeMutablePointer<CMSDecoder?>) -> OSStatus
```

## Parameters

- `cmsDecoderOut`: On return, points to a CMSDecoder reference. You must use the CFRelease function to free this reference when you are finished using it.

## Return Value

Return Value A result code. See Security Framework Result Codes.

## Discussion

Discussion This is the first function in a sequence of decoder functions that you call to get information from a CMS message. The other functions in the sequence require you to pass in the CMSDecoder reference returned by this function. The next function in the sequence is CMSDecoderUpdateMessage.

## See Also

### Related Documentation

- [CMSDecoderUpdateMessage(_:_:_:)](security/cmsdecoderupdatemessage(_:_:_:).md)
