[][src]Struct openssl::pkey::PKeyRef

pub struct PKeyRef<T>(_, _);

Reference to PKey.

Methods

impl<T> PKeyRef<T>
[src]

Returns a copy of the internal RSA key.

This corresponds to EVP_PKEY_get1_RSA.

Returns a copy of the internal DSA key.

This corresponds to EVP_PKEY_get1_DSA.

Returns a copy of the internal DH key.

This corresponds to EVP_PKEY_get1_DH.

Returns a copy of the internal elliptic curve key.

This corresponds to EVP_PKEY_get1_EC_KEY.

Returns the Id that represents the type of this key.

This corresponds to EVP_PKEY_id.

impl<T> PKeyRef<T> where
    T: HasPublic
[src]

Serializes the public key into a PEM-encoded SubjectPublicKeyInfo structure.

The output will have a header of -----BEGIN PUBLIC KEY-----.

This corresponds to PEM_write_bio_PUBKEY.

Serializes the public key into a DER-encoded SubjectPublicKeyInfo structure.

This corresponds to i2d_PUBKEY.

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.

impl<T> PKeyRef<T> where
    T: HasPrivate
[src]

Serializes the private key to a PEM-encoded PKCS#8 PrivateKeyInfo structure.

The output will have a header of -----BEGIN PRIVATE KEY-----.

This corresponds to PEM_write_bio_PKCS8PrivateKey.

Serializes the private key to a PEM-encoded PKCS#8 EncryptedPrivateKeyInfo structure.

The output will have a header of -----BEGIN ENCRYPTED PRIVATE KEY-----.

This corresponds to PEM_write_bio_PKCS8PrivateKey.

Serializes the private key to a DER-encoded key type specific format.

This corresponds to i2d_PrivateKey.

Trait Implementations

impl<T> Sync for PKeyRef<T>
[src]

impl<T> AsRef<PKeyRef<T>> for PKey<T>
[src]

Performs the conversion.

impl<T> Send for PKeyRef<T>
[src]

impl<T> Borrow<PKeyRef<T>> for PKey<T>
[src]

Immutably borrows from an owned value. Read more

impl<T> ForeignTypeRef for PKeyRef<T>
[src]

The raw C type.

Constructs a shared instance of this type from its raw type.

Constructs a mutable reference of this type from its raw type.

Returns a raw pointer to the wrapped value.

Blanket Implementations

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more