Enum PublicKeyFormat

  • All Implemented Interfaces:
    com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<PublicKeyFormat>

    public enum PublicKeyFormat
    extends Enum<PublicKeyFormat>
    implements com.google.protobuf.ProtocolMessageEnum
     The supported formats for the public key.
     
    Protobuf enum google.cloud.iot.v1.PublicKeyFormat
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ES256_PEM
      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-----`.
      ES256_X509_PEM
      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-----`.
      RSA_PEM
      An RSA public key encoded in base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`.
      RSA_X509_PEM
      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-----`.
      UNRECOGNIZED  
      UNSPECIFIED_PUBLIC_KEY_FORMAT
      The format has not been specified.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ES256_PEM_VALUE
      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-----`.
      static int ES256_X509_PEM_VALUE
      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-----`.
      static int RSA_PEM_VALUE
      An RSA public key encoded in base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`.
      static int RSA_X509_PEM_VALUE
      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-----`.
      static int UNSPECIFIED_PUBLIC_KEY_FORMAT_VALUE
      The format has not been specified.
    • Enum Constant Detail

      • UNSPECIFIED_PUBLIC_KEY_FORMAT

        public static final PublicKeyFormat UNSPECIFIED_PUBLIC_KEY_FORMAT
         The format has not been specified. This is an invalid default value and
         must not be used.
         
        UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;
      • RSA_PEM

        public static final PublicKeyFormat RSA_PEM
         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)).
         
        RSA_PEM = 3;
      • RSA_X509_PEM

        public static final PublicKeyFormat RSA_X509_PEM
         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-----`.
         
        RSA_X509_PEM = 1;
      • ES256_PEM

        public static final PublicKeyFormat ES256_PEM
         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.
         
        ES256_PEM = 2;
      • ES256_X509_PEM

        public static final PublicKeyFormat ES256_X509_PEM
         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-----`.
         
        ES256_X509_PEM = 4;
    • Field Detail

      • UNSPECIFIED_PUBLIC_KEY_FORMAT_VALUE

        public static final int UNSPECIFIED_PUBLIC_KEY_FORMAT_VALUE
         The format has not been specified. This is an invalid default value and
         must not be used.
         
        UNSPECIFIED_PUBLIC_KEY_FORMAT = 0;
        See Also:
        Constant Field Values
      • RSA_PEM_VALUE

        public static final int RSA_PEM_VALUE
         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)).
         
        RSA_PEM = 3;
        See Also:
        Constant Field Values
      • RSA_X509_PEM_VALUE

        public static final int RSA_X509_PEM_VALUE
         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-----`.
         
        RSA_X509_PEM = 1;
        See Also:
        Constant Field Values
      • ES256_PEM_VALUE

        public static final int ES256_PEM_VALUE
         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.
         
        ES256_PEM = 2;
        See Also:
        Constant Field Values
      • ES256_X509_PEM_VALUE

        public static final int ES256_X509_PEM_VALUE
         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-----`.
         
        ES256_X509_PEM = 4;
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static PublicKeyFormat[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PublicKeyFormat c : PublicKeyFormat.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PublicKeyFormat valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static PublicKeyFormat valueOf​(int value)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        value - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • forNumber

        public static PublicKeyFormat forNumber​(int value)
        Parameters:
        value - The numeric wire value of the corresponding enum entry.
        Returns:
        The enum associated with the given numeric wire value.
      • internalGetValueMap

        public static com.google.protobuf.Internal.EnumLiteMap<PublicKeyFormat> internalGetValueMap()
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static PublicKeyFormat valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        desc - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null