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

# init(pemRepresentation:)

Creates a P-256 public key for signing from a Privacy-Enhanced Mail (PEM) representation.

## Declaration

```swift
init(pemRepresentation: String) throws
```

## Parameters

- `pemRepresentation`: A PEM 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(derRepresentation:)](cryptokit/p256/signing/publickey/init(derrepresentation:).md)
- [init(x963Representation:)](cryptokit/p256/signing/publickey/init(x963representation:).md)
