pub struct Ed25519PublicKey { /* private fields */ }Implementations§
Source§impl Ed25519PublicKey
impl Ed25519PublicKey
pub fn from_bytes(raw: &[u8]) -> Result<Self, Error>
pub fn from_der(der: &[u8]) -> Result<Self, Error>
pub fn from_pem(pem: &str) -> Result<Self, Error>
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_der(&self) -> Vec<u8> ⓘ
pub fn to_pem(&self) -> String
pub fn with_key_id(self, key_id: &str) -> Self
pub fn sha1_thumbprint(&self) -> String
pub fn sha256_thumbprint(&self) -> String
Sourcepub fn from_jwk(jwk: &str) -> Result<Self, Error>
pub fn from_jwk(jwk: &str) -> Result<Self, Error>
Import a public key from a JWK (kty: OKP, crv: Ed25519).
alg can be either EdDSA or Ed25519.
See strict JWK validation for the other rules.
Sourcepub fn jwk_thumbprint(&self) -> String
pub fn jwk_thumbprint(&self) -> String
The JWK thumbprint of the key.
Trait Implementations§
Source§impl Clone for Ed25519PublicKey
impl Clone for Ed25519PublicKey
Source§impl Debug for Ed25519PublicKey
impl Debug for Ed25519PublicKey
Source§impl EdDSAPublicKeyLike for Ed25519PublicKey
impl EdDSAPublicKeyLike for Ed25519PublicKey
Source§fn verify_token<CustomClaims: DeserializeOwned>(
&self,
token: &str,
options: Option<VerificationOptions>,
) -> Result<JWTClaims<CustomClaims>, Error>
fn verify_token<CustomClaims: DeserializeOwned>( &self, token: &str, options: Option<VerificationOptions>, ) -> Result<JWTClaims<CustomClaims>, Error>
Accepts both EdDSA and Ed25519 as the token algorithm.
fn jwt_alg_name() -> &'static str
fn public_key(&self) -> &Edwards25519PublicKey
fn key_id(&self) -> &Option<String>
fn set_key_id(&mut self, key_id: String)
fn create_key_id(&mut self) -> &str
Auto Trait Implementations§
impl Freeze for Ed25519PublicKey
impl RefUnwindSafe for Ed25519PublicKey
impl Send for Ed25519PublicKey
impl Sync for Ed25519PublicKey
impl Unpin for Ed25519PublicKey
impl UnsafeUnpin for Ed25519PublicKey
impl UnwindSafe for Ed25519PublicKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more