Enum jwtk::SomePrivateKey [−][src]
#[non_exhaustive]
pub enum SomePrivateKey {
Ed25519(Ed25519PrivateKey),
Ecdsa(EcdsaPrivateKey),
Rsa(RsaPrivateKey),
}
Expand description
An RSA, EC or Ed25519 private key.
Use this if you just want to load SOME private key from an external pem file.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ed25519(Ed25519PrivateKey)
Tuple Fields
Ecdsa(EcdsaPrivateKey)
Tuple Fields
Rsa(RsaPrivateKey)
Tuple Fields
Implementations
Read an RSA/EC/Ed25519 private key from PEM.
For an EC/Ed25519 private key, algorithm is deduced from the curve, e.g. P-256 -> ES256.
For an RSA private key, if_rsa_algorithm
is used.
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.