Reference documentation and code samples for the Google Cloud IoT Core V1 Client class PublicKeyFormat.
The supported formats for the public key.
Protobuf type google.cloud.iot.v1.PublicKeyFormat
Namespace
Google \ Cloud \ Iot \ V1
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
UNSPECIFIED_PUBLIC_KEY_FORMAT
Value: 0
The format has not been specified. This is an invalid default value and
must not be used.
Generated from protobuf enum UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;
RSA_PEM
Value: 3
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).
Generated from protobuf enum RSA_PEM = 3;
RSA_X509_PEM
Value: 1
As RSA_PEM, but wrapped in an X.509v3 certificate (RFC5280), encoded in base64, and wrapped by
-----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
Generated from protobuf enum RSA_X509_PEM = 1;
ES256_PEM
Value: 2
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). This curve is
defined in OpenSSL as the prime256v1 curve.
Generated from protobuf enum ES256_PEM = 2;
ES256_X509_PEM
Value: 4
As ES256_PEM, but wrapped in an X.509v3 certificate (RFC5280), encoded in base64, and wrapped by
-----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Cloud IoT Core V1 Client - Class PublicKeyFormat (1.7.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.5 (latest)](/php/docs/reference/cloud-iot/latest/V1.PublicKeyFormat)\n- [1.7.4](/php/docs/reference/cloud-iot/1.7.4/V1.PublicKeyFormat)\n- [1.6.4](/php/docs/reference/cloud-iot/1.6.4/V1.PublicKeyFormat)\n- [1.5.12](/php/docs/reference/cloud-iot/1.5.12/V1.PublicKeyFormat) \nReference documentation and code samples for the Google Cloud IoT Core V1 Client class PublicKeyFormat.\n\nThe supported formats for the public key.\n\nProtobuf type `google.cloud.iot.v1.PublicKeyFormat`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Iot \\\\ V1\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### UNSPECIFIED_PUBLIC_KEY_FORMAT\n\n Value: 0\n\nThe format has not been specified. This is an invalid default value and\nmust not be used.\n\nGenerated from protobuf enum `UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;`\n\n### RSA_PEM\n\n Value: 3\n\nAn RSA public key encoded in base64, and wrapped by\n`-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be\nused to verify `RS256` signatures in JWT tokens ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)).\n\nGenerated from protobuf enum `RSA_PEM = 3;`\n\n### RSA_X509_PEM\n\n Value: 1\n\nAs RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by\n`-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.\n\nGenerated from protobuf enum `RSA_X509_PEM = 1;`\n\n### ES256_PEM\n\n Value: 2\n\nPublic key for the ECDSA algorithm using P-256 and SHA-256, encoded in\nbase64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END\nPUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256`\nalgorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is\ndefined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve.\n\nGenerated from protobuf enum `ES256_PEM = 2;`\n\n### ES256_X509_PEM\n\n Value: 4\n\nAs ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by\n`-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.\n\nGenerated from protobuf enum `ES256_X509_PEM = 4;`"]]