pub struct ES256KeyPair { /* private fields */ }Implementations§
Source§impl ES256KeyPair
impl ES256KeyPair
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) -> Result<Vec<u8>, Error>
pub fn to_pem(&self) -> Result<String, Error>
pub fn public_key(&self) -> ES256PublicKey
pub fn generate() -> Self
pub fn with_key_id(self, key_id: &str) -> Self
Trait Implementations§
Source§impl Debug for ES256KeyPair
impl Debug for ES256KeyPair
Source§impl ECDSAP256KeyPairLike for ES256KeyPair
impl ECDSAP256KeyPairLike for ES256KeyPair
fn jwt_alg_name() -> &'static str
fn key_pair(&self) -> &P256KeyPair
fn key_id(&self) -> &Option<String>
fn metadata(&self) -> &Option<KeyMetadata>
fn attach_metadata(&mut self, metadata: KeyMetadata) -> Result<(), Error>
fn sign<CustomClaims: Serialize>( &self, claims: JWTClaims<CustomClaims>, ) -> Result<String, Error>
fn sign_with_options<CustomClaims: Serialize>( &self, claims: JWTClaims<CustomClaims>, opts: &HeaderOptions, ) -> Result<String, Error>
Auto Trait Implementations§
impl Freeze for ES256KeyPair
impl RefUnwindSafe for ES256KeyPair
impl Send for ES256KeyPair
impl Sync for ES256KeyPair
impl Unpin for ES256KeyPair
impl UnsafeUnpin for ES256KeyPair
impl UnwindSafe for ES256KeyPair
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