pub struct ES256kKeyPair { /* private fields */ }
Implementations§
source§impl ES256kKeyPair
impl ES256kKeyPair
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) -> ES256kPublicKey
pub fn generate() -> Self
pub fn with_key_id(self, key_id: &str) -> Self
Trait Implementations§
source§impl ECDSAP256kKeyPairLike for ES256kKeyPair
impl ECDSAP256kKeyPairLike for ES256kKeyPair
fn jwt_alg_name() -> &'static str
fn key_pair(&self) -> &K256KeyPair
fn key_id(&self) -> &Option<String>
fn metadata(&self) -> &Option<KeyMetadata>
fn attach_metadata(&mut self, metadata: KeyMetadata) -> Result<(), Error>
fn sign<CustomClaims: Serialize + DeserializeOwned>( &self, claims: JWTClaims<CustomClaims>, ) -> Result<String, Error>
Auto Trait Implementations§
impl Freeze for ES256kKeyPair
impl RefUnwindSafe for ES256kKeyPair
impl Send for ES256kKeyPair
impl Sync for ES256kKeyPair
impl Unpin for ES256kKeyPair
impl UnwindSafe for ES256kKeyPair
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