[][src]Struct signatory_ring::ecdsa::p384::Signer

pub struct Signer<S>(_)
where
    S: Signature
;

NIST P-384 ECDSA signer

Trait Implementations

impl FromPkcs8 for Signer<Asn1Signature>[src]

fn from_pkcs8<K: AsRef<[u8]>>(secret_key: K) -> Result<Self, Error>[src]

Create a new ECDSA signer which produces fixed-width signatures from a PKCS#8 keypair

fn read_pkcs8<R>(reader: R) -> Result<Self, Error> where
    R: Read
[src]

Read PKCS#8 data from the given std::io::Read.

fn from_pkcs8_file<P>(path: P) -> Result<Self, Error> where
    P: AsRef<Path>, 
[src]

Read PKCS#8 data from the file at the given path.

impl FromPkcs8 for Signer<FixedSignature>[src]

fn from_pkcs8<K: AsRef<[u8]>>(secret_key: K) -> Result<Self, Error>[src]

Create a new ECDSA signer which produces fixed-width signatures from a PKCS#8 keypair

fn read_pkcs8<R>(reader: R) -> Result<Self, Error> where
    R: Read
[src]

Read PKCS#8 data from the given std::io::Read.

fn from_pkcs8_file<P>(path: P) -> Result<Self, Error> where
    P: AsRef<Path>, 
[src]

Read PKCS#8 data from the file at the given path.

impl GeneratePkcs8 for Signer<Asn1Signature>[src]

fn generate_pkcs8() -> Result<SecretKey, Error>[src]

Randomly generate a P-384 PKCS#8 keypair

fn generate_pkcs8_file<P>(path: P) -> Result<File, Error> where
    P: AsRef<Path>, 
[src]

Write randomly generated PKCS#8 private key to the file at the given path. Read more

impl GeneratePkcs8 for Signer<FixedSignature>[src]

fn generate_pkcs8() -> Result<SecretKey, Error>[src]

Randomly generate a P-384 PKCS#8 keypair

fn generate_pkcs8_file<P>(path: P) -> Result<File, Error> where
    P: AsRef<Path>, 
[src]

Write randomly generated PKCS#8 private key to the file at the given path. Read more

impl<S> PublicKeyed<PublicKey<NistP384>> for Signer<S> where
    S: Signature + Send + Sync
[src]

fn public_key(&self) -> Result<PublicKey, Error>[src]

Obtain the public key which identifies this signer

impl Signer<Asn1Signature<NistP384>> for Signer<Asn1Signature>[src]

fn sign(&self, msg: &[u8]) -> S[src]

Sign the given message and return a digital signature

impl Signer<FixedSignature<NistP384>> for Signer<FixedSignature>[src]

fn sign(&self, msg: &[u8]) -> S[src]

Sign the given message and return a digital signature

Auto Trait Implementations

impl<S> Send for Signer<S> where
    S: Send

impl<S> Sync for Signer<S> where
    S: Sync

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self