pub struct Ed25519KeyPair { /* private fields */ }
Implementations§
source§impl Ed25519KeyPair
impl Ed25519KeyPair
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 public_key(&self) -> Ed25519PublicKey
pub fn generate() -> Self
pub fn with_key_id(self, key_id: &str) -> Self
Trait Implementations§
source§impl Clone for Ed25519KeyPair
impl Clone for Ed25519KeyPair
source§fn clone(&self) -> Ed25519KeyPair
fn clone(&self) -> Ed25519KeyPair
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl EdDSAKeyPairLike for Ed25519KeyPair
impl EdDSAKeyPairLike for Ed25519KeyPair
fn jwt_alg_name() -> &'static str
fn key_pair(&self) -> &Edwards25519KeyPair
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 Ed25519KeyPair
impl RefUnwindSafe for Ed25519KeyPair
impl Send for Ed25519KeyPair
impl Sync for Ed25519KeyPair
impl Unpin for Ed25519KeyPair
impl UnwindSafe for Ed25519KeyPair
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)