pub struct Es384Signer { /* private fields */ }Available on crate features
signatures and signatures-es384 only.Expand description
ECDSA P-384 signer (ES384).
Implementations§
Source§impl Es384Signer
impl Es384Signer
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 Es384Signer
impl Signer for Es384Signer
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 Es384Signer
impl RefUnwindSafe for Es384Signer
impl Send for Es384Signer
impl Sync for Es384Signer
impl Unpin for Es384Signer
impl UnsafeUnpin for Es384Signer
impl UnwindSafe for Es384Signer
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