#[repr(i32)]pub enum PublicKeyFormat {
UnspecifiedPublicKeyFormat = 0,
RsaPem = 3,
RsaX509Pem = 1,
Es256Pem = 2,
Es256X509Pem = 4,
}Expand description
The supported formats for the public key.
Variants§
UnspecifiedPublicKeyFormat = 0
The format has not been specified. This is an invalid default value and must not be used.
RsaPem = 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).
RsaX509Pem = 1
As RSA_PEM, but wrapped in an X.509v3 certificate (RFC5280), encoded in base64, and wrapped by
-----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
Es256Pem = 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.
Es256X509Pem = 4
As ES256_PEM, but wrapped in an X.509v3 certificate (RFC5280), encoded in base64, and wrapped by
-----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.
Implementations§
Source§impl PublicKeyFormat
impl PublicKeyFormat
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for PublicKeyFormat
impl Clone for PublicKeyFormat
Source§fn clone(&self) -> PublicKeyFormat
fn clone(&self) -> PublicKeyFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more