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

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> Borrow<PKeyRef<T>> for PKey<T>
[src]

Immutably borrows from an owned value. Read more

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

Performs the conversion.

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

The raw C type.

Important traits for &'a mut R

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

Important traits for &'a mut R

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

Returns a raw pointer to the wrapped value.

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

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