[−][src]Struct ring::signature::ECDSAKeyPair  
An ECDSA key pair, used for signing.
Methods
impl Key[src]
pub fn generate_pkcs8(
    alg: &'static Algorithm, 
    rng: &dyn SecureRandom
) -> Result<Document, Unspecified>[src]
alg: &'static Algorithm,
rng: &dyn SecureRandom
) -> Result<Document, Unspecified>
Generates a new key pair and returns the key pair serialized as a PKCS#8 document.
The PKCS#8 document will be a v1 OneAsymmetricKey with the public key
included in the ECPrivateKey structure, as described in
RFC 5958 Section 2 and RFC 5915. The ECPrivateKey structure will
not have a parameters field so the generated key is compatible with
PKCS#11.
pub fn from_pkcs8(
    alg: &'static Algorithm, 
    input: Input
) -> Result<Self, Unspecified>[src]
alg: &'static Algorithm,
input: Input
) -> Result<Self, Unspecified>
Constructs an ECDSA key pair by parsing an unencrypted PKCS#8 v1
id-ecPublicKey ECPrivateKey key.
The input must be in PKCS#8 v1 format. It must contain the public key in
the ECPrivateKey structure; from_pkcs8() will verify that the public
key and the private key are consistent with each other. The algorithm
identifier must identify the curve by name; it must not use an
"explicit" encoding of the curve. The parameters field of the
ECPrivateKey, if present, must be the same named curve that is in the
algorithm identifier in the PKCS#8 header.
pub fn from_private_key_and_public_key(
    alg: &'static Algorithm, 
    private_key: Input, 
    public_key: Input
) -> Result<Self, Unspecified>[src]
alg: &'static Algorithm,
private_key: Input,
public_key: Input
) -> Result<Self, Unspecified>
Constructs an ECDSA key pair directly from the big-endian-encoded private key and public key bytes.
This is intended for use by code that deserializes key pairs. It is
recommended to use ECDSAKeyPair::from_pkcs8() (with a PKCS#8-encoded
key) instead.
pub fn sign(
    &self, 
    msg: Input, 
    rng: &dyn SecureRandom
) -> Result<Signature, Unspecified>[src]
&self,
msg: Input,
rng: &dyn SecureRandom
) -> Result<Signature, Unspecified>
Deprecated.
Trait Implementations
Auto Trait Implementations
impl Unpin for Key
impl Send for Key
impl Sync for Key
impl UnwindSafe for Key
impl RefUnwindSafe for Key
Blanket Implementations
impl<T, U> TryFrom<U> for T where
    U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
    U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
    T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
    T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,