---
title: serverChallenge
framework: avfoundation
role: symbol
role_heading: Type Property
path: avfoundation/avcontentkeysessionserverplaybackcontextoption/serverchallenge
---

# serverChallenge

Specifies a nonce to include in the secure server playback context (SPC) to prevent replay attacks.

## Declaration

```swift
static let serverChallenge: AVContentKeySessionServerPlaybackContextOption
```

## Discussion

Discussion Specify this value as an 8-byte NSData object. If you don’t specify a value for this key, the system assumes a default server challenge of 0.

## See Also

### Server playback context options

- [protocolVersions](avfoundation/avcontentkeysessionserverplaybackcontextoption/protocolversions.md)
