Struct openssl::pkey::PKey []

pub struct PKey(_);

Methods

impl PKey
[src]

Creates a new PKey containing an RSA key.

Creates a new PKey containing a DSA key.

Creates a new PKey containing a Diffie-Hellman key.

Creates a new PKey containing an elliptic curve key.

Creates a new PKey containing an HMAC key.

Note

To compute HMAC values, use the sign module.

Deserializes a PEM-formatted private key.

Deserializes a PEM-formatted private key, using the supplied password if the key is encrypted.

Panics

Panics if passphrase contains an embedded null.

Deserializes a PEM-formatted private key, using a callback to retrieve a password if the key is encrypted.

The callback should copy the password into the provided buffer and return the number of bytes written.

Deserializes a public key from PEM-formatted data.

Deserializes a public key from DER-formatted data.

Deserializes a private key from DER-formatted data.

Deserializes a DER-formatted PKCS#8 private key, using a callback to retrieve the password if the key is encrpyted.

The callback should copy the password into the provided buffer and return the number of bytes written.

Deserializes a DER-formatted PKCS#8 private key, using the supplied password if the key is encrypted.

Panics

Panics if passphrase contains an embedded null.

Deprecated since 0.9.2

: use private_key_from_pem_callback

Methods from Deref<Target = PKeyRef>

Returns a copy of the internal RSA key.

Returns a copy of the internal DSA key.

Returns a copy of the internal DH key.

Returns a copy of the internal elliptic curve key.

Serializes a public key to PEM.

Serializes the private key to PEM.

Serializes the private key to PEM, encrypting it with the specified symmetric cipher and passphrase.

Serializes the private key to DER.

Serializes the public key to DER.

Returns the size of the key.

This corresponds to the bit length of the modulus of an RSA key, and the bit length of the group order for an elliptic curve key, for example.

Compares the public component of this key with another.

Trait Implementations

impl ForeignType for PKey

The raw C type.

The type representing a reference to this type.

Constructs an instance of this type from its raw type.

Returns a raw pointer to the wrapped value.

impl Drop for PKey

A method called when the value goes out of scope. Read more

impl Deref for PKey

The resulting type after dereferencing

The method called to dereference a value

impl DerefMut for PKey

The method called to mutably dereference a value

impl Send for PKey
[src]

impl Sync for PKey
[src]