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

# init(compactRepresentation:)

Creates a P-256 public key for signing from a compact representation of the key.

## Declaration

```swift
init<Bytes>(compactRepresentation: Bytes) throws where Bytes : ContiguousBytes
```

## Parameters

- `compactRepresentation`: A compact representation of the key as a collection of contiguous bytes.

## See Also

### Creating a key

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