<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/AddOnionResponse/privateKey",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor16AddOnionResponseV10privateKeySSSgvp"
  },
  "title" : "privateKey"
}
-->

# privateKey

The private key blob, or `nil` when `DiscardPK` was set.

```
let privateKey: String?
```

## Discussion

Extracted from the `PrivateKey=` line when present (never
returned by Tor when `DiscardPK` was included in the
request). Format is `<KeyType>:<KeyBlob>` verbatim — round-
tripping through [`OnionKeySpec.providedV3(_:)`](/documentation/Tor/OnionKeySpec/providedV3(_:)) requires
passing only the `<KeyBlob>` suffix.

- Stability: immutable.

> Important: Secret material. Treat as a credential.