<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GSS",
  "identifier" : "/documentation/GSS/gss_wrap_size_limit(_:_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "GSS"
    ],
    "preciseIdentifier" : "c:@F@gss_wrap_size_limit"
  },
  "title" : "gss_wrap_size_limit(_:_:_:_:_:_:)"
}
-->

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

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

```
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 [Object Identifiers](/documentation/GSS/object-identifiers) for possible values.

`req_output_size`

The maximum allowable output token size from the [`gss_wrap(_:_:_:_:_:_:_:)`](/documentation/GSS/gss_wrap(_:_:_:_:_:_:_:)) function.

`max_input_size`

A  pointer the function uses to return the maximum input size.

## Return Value

A status code set to [`GSS_S_COMPLETE`](/documentation/GSS/GSS_S_COMPLETE) on success. See [Function Status](/documentation/GSS/function-status) for a description of other status outputs.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)