0.22.0 (latest) 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.2 0.15.1 0.14.1 0.13.0 0.12.2 0.11.3 0.10.0 0.9.1 0.8.3 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the KMS Inventory V1 API module Google::Cloud::Kms::V1::PublicKey::PublicKeyFormat.

The supported [PublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-PublicKey "Google::Cloud::Kms::V1::PublicKey (class)") formats.

## Constants

### PUBLIC_KEY_FORMAT_UNSPECIFIED

**value:** 0  
If the
\[public_key_format\]\[google.cloud.kms.v1.GetPublicKeyRequest.public_key_format\]
field is not specified:


- For PQC algorithms, an error will be returned.
- For non-PQC algorithms, the default format is PEM, and the field [pem](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-PublicKey#Google__Cloud__Kms__V1__PublicKey_pem_instance_ "Google::Cloud::Kms::V1::PublicKey#pem (method)") will be populated.

<br />

Otherwise, the public key will be exported through the
[public_key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-PublicKey#Google__Cloud__Kms__V1__PublicKey_public_key_instance_ "Google::Cloud::Kms::V1::PublicKey#public_key (method)") field in the
requested format.

### PEM

**value:** 1  
The returned public key will be encoded in PEM format.
See the [RFC7468](https://tools.ietf.org/html/rfc7468) sections for
[General Considerations](https://tools.ietf.org/html/rfc7468#section-2)
and [Textual Encoding of Subject Public Key Info](https://tools.ietf.org/html/rfc7468#section-13) for more information.

### DER

**value:** 2  
The returned public key will be encoded in DER format (the
PrivateKeyInfo structure from RFC 5208).

### NIST_PQC

**value:** 3  
This is supported only for PQC algorithms.
The key material is returned in the format defined by NIST PQC
standards (FIPS 203, FIPS 204, and FIPS 205).

### XWING_RAW_BYTES

**value:** 4  
The returned public key is in raw bytes format defined in its standard
<https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem>.