<!--
{
  "availability" : [
    "tvOS: 13.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/SecureEnclave/P256/KeyAgreement/PrivateKey/init(dataRepresentation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit13SecureEnclaveO4P256O12KeyAgreementO07PrivateF0V18dataRepresentationAI10Foundation4DataV_tKcfc"
  },
  "title" : "init(dataRepresentation:)"
}
-->

# init(dataRepresentation:)

Creates a P-256 private key for key agreement from the
specified data representation.

```
init(dataRepresentation: Data) throws
```

## Parameters

`dataRepresentation`

A data representation of the key.

---

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)