---
title: "init(derRepresentation:)"
framework: cryptokit
role: symbol
role_heading: Initializer
path: "cryptokit/p256/signing/privatekey/init(derrepresentation:)"
---

# init(derRepresentation:)

Creates a P-256 private key for signing from a Distinguished Encoding Rules (DER) encoded representation.

## Declaration

```swift
init<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8
```

## Parameters

- `derRepresentation`: A DER-encoded representation of the key.

## See Also

### Creating a private key

- [init(rawRepresentation:)](cryptokit/p256/signing/privatekey/init(rawrepresentation:).md)
- [init(compactRepresentable:)](cryptokit/p256/signing/privatekey/init(compactrepresentable:).md)
- [init(pemRepresentation:)](cryptokit/p256/signing/privatekey/init(pemrepresentation:).md)
- [init(x963Representation:)](cryptokit/p256/signing/privatekey/init(x963representation:).md)
