---
title: "gss_wrap_size_limit(_:_:_:_:_:_:)"
framework: GSS
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, Mac Catalyst 13.1+, macOS 10.7+, visionOS 1.0+]
path: "gss/gss_wrap_size_limit(_:_:_:_:_:_:)"
---

# gss_wrap_size_limit(_:_:_:_:_:_:)

Returns the largest allowable wrap size for a given set of constraints.

## Declaration

```swift
func gss_wrap_size_limit(_ minor_status: UnsafeMutablePointer<OM_uint32>, _ context_handle: gss_ctx_id_t, _ conf_req_flag: Int32, _ qop_req: gss_qop_t, _ req_output_size: OM_uint32, _ max_input_size: UnsafeMutablePointer<OM_uint32>) -> OM_uint32
```

## Parameters

- `minor_status`: A pointer to the secondary status result that provides additional information in case of failure.
- `context_handle`: The context used to transmit the data.
- `conf_req_flag`: A flag that you set to a non-zero value to indicate that wrapping function will apply confidentiality in addition to integrity protection or zero if only integrity protection is required.
- `qop_req`: The required quality of protection. See doc://com.apple.gss/documentation/GSS/object-identifiers for possible values.
- `req_output_size`: The maximum allowable output token size from the doc://com.apple.gss/documentation/GSS/gss_wrap(_:_:_:_:_:_:_:) function.
- `max_input_size`: A pointer the function uses to return the maximum input size.

## Return Value

Return Value A status code set to GSS_S_COMPLETE on success. See Function Status for a description of other status outputs.

## See Also

### Inquiry and Limits

- [gss_context_time(_:_:_:)](gss/gss_context_time(_:_:_:).md)
- [gss_inquire_context(_:_:_:_:_:_:_:_:_:)](gss/gss_inquire_context(_:_:_:_:_:_:_:_:_:).md)
- [gss_inquire_sec_context_by_oid(_:_:_:_:)](gss/gss_inquire_sec_context_by_oid(_:_:_:_:).md)
