# Cloud IoT v1 API - Enum PublicKeyFormat (2.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.2.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1.PublicKeyFormat)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.1.0/Google.Cloud.Iot.V1.PublicKeyFormat)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/2.0.0/Google.Cloud.Iot.V1.PublicKeyFormat)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.2.0/Google.Cloud.Iot.V1.PublicKeyFormat)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.1.0/Google.Cloud.Iot.V1.PublicKeyFormat)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/1.0.0/Google.Cloud.Iot.V1.PublicKeyFormat)

    public enum PublicKeyFormat

Reference documentation and code samples for the Cloud IoT v1 API enum PublicKeyFormat.

The supported formats for the public key.

## Namespace

[Google.Cloud.Iot.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iot.V1/latest/Google.Cloud.Iot.V1)

## Assembly

Google.Cloud.Iot.V1.dll

| ## Fields ||
|---|---|
| **Name** | **Description** |
| `Es256Pem` | Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in base64, and wrapped by `---BEGIN PUBLIC KEY---` and `---END PUBLIC KEY---`. This can be used to verify JWT tokens with the `ES256` algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve. |
| `Es256X509Pem` | As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by `---BEGIN CERTIFICATE---` and `---END CERTIFICATE---`. |
| `RsaPem` | An RSA public key encoded in base64, and wrapped by `---BEGIN PUBLIC KEY---` and `---END PUBLIC KEY---`. This can be used to verify `RS256` signatures in JWT tokens ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). |
| `RsaX509Pem` | As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by `---BEGIN CERTIFICATE---` and `---END CERTIFICATE---`. |
| `UnspecifiedPublicKeyFormat` | The format has not been specified. This is an invalid default value and must not be used. |