pub struct EddsaSigner { /* private fields */ }Available on crate features
signatures and eddsa only.Expand description
EdDSA (Ed25519) signer.
Implementations§
Source§impl EddsaSigner
impl EddsaSigner
Sourcepub fn from_pem(pem: &str, signer_info: SignerInfo) -> Result<Self>
pub fn from_pem(pem: &str, signer_info: SignerInfo) -> Result<Self>
Create a new signer from a PEM-encoded private key.
§Errors
Returns an error if the PEM cannot be parsed.
Sourcepub fn generate(signer_info: SignerInfo) -> Result<(Self, String)>
pub fn generate(signer_info: SignerInfo) -> Result<(Self, String)>
Generate a new random signing key.
Returns the signer and the public key in PEM format.
§Errors
Returns an error if key generation fails.
Sourcepub fn public_key_pem(&self) -> Result<String>
pub fn public_key_pem(&self) -> Result<String>
Trait Implementations§
Source§impl Signer for EddsaSigner
impl Signer for EddsaSigner
Source§fn algorithm(&self) -> SignatureAlgorithm
fn algorithm(&self) -> SignatureAlgorithm
Get the signature algorithm used by this signer.
Source§fn signer_info(&self) -> SignerInfo
fn signer_info(&self) -> SignerInfo
Get information about the signer.
Auto Trait Implementations§
impl Freeze for EddsaSigner
impl RefUnwindSafe for EddsaSigner
impl Send for EddsaSigner
impl Sync for EddsaSigner
impl Unpin for EddsaSigner
impl UnsafeUnpin for EddsaSigner
impl UnwindSafe for EddsaSigner
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