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

# init(derRepresentation:)

Creates a P-256 public 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 key

- [init(rawRepresentation:)](cryptokit/p256/signing/publickey/init(rawrepresentation:).md)
- [init(compactRepresentation:)](cryptokit/p256/signing/publickey/init(compactrepresentation:).md)
- [init(compressedRepresentation:)](cryptokit/p256/signing/publickey/init(compressedrepresentation:).md)
- [init(pemRepresentation:)](cryptokit/p256/signing/publickey/init(pemrepresentation:).md)
- [init(x963Representation:)](cryptokit/p256/signing/publickey/init(x963representation:).md)
