Reference documentation and code samples for the Cloud IoT V1 API module Google::Cloud::Iot::V1::PublicKeyFormat.
The supported formats for the public key.
Constants
UNSPECIFIED_PUBLIC_KEY_FORMAT
value: 0 The format has not been specified. This is an invalid default value and
must not be used.
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).
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-----.
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.
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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud IoT V1 API - Module Google::Cloud::Iot::V1::PublicKeyFormat (v0.9.2)\n\nVersion latestkeyboard_arrow_down\n\n- [0.9.2 (latest)](/ruby/docs/reference/google-cloud-iot-v1/latest/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.9.1](/ruby/docs/reference/google-cloud-iot-v1/0.9.1/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.8.0](/ruby/docs/reference/google-cloud-iot-v1/0.8.0/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.7.1](/ruby/docs/reference/google-cloud-iot-v1/0.7.1/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.6.0](/ruby/docs/reference/google-cloud-iot-v1/0.6.0/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.5.0](/ruby/docs/reference/google-cloud-iot-v1/0.5.0/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.4.0](/ruby/docs/reference/google-cloud-iot-v1/0.4.0/Google-Cloud-Iot-V1-PublicKeyFormat)\n- [0.3.5](/ruby/docs/reference/google-cloud-iot-v1/0.3.5/Google-Cloud-Iot-V1-PublicKeyFormat) \nReference documentation and code samples for the Cloud IoT V1 API module Google::Cloud::Iot::V1::PublicKeyFormat.\n\nThe supported formats for the public key.\n\nConstants\n---------\n\n### UNSPECIFIED_PUBLIC_KEY_FORMAT\n\n**value:** 0 \nThe format has not been specified. This is an invalid default value and\nmust not be used.\n\n### RSA_PEM\n\n**value:** 3 \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\n### RSA_X509_PEM\n\n**value:** 1 \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\n### ES256_PEM\n\n**value:** 2 \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\n### ES256_X509_PEM\n\n**value:** 4 \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-----`."]]