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

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

Reference to PKey.

Methods

impl<T> PKeyRef<T>
[src]

[src]

Returns a copy of the internal RSA key.

This corresponds to EVP_PKEY_get1_RSA.

[src]

Returns a copy of the internal DSA key.

This corresponds to EVP_PKEY_get1_DSA.

[src]

Returns a copy of the internal DH key.

This corresponds to EVP_PKEY_get1_DH.

[src]

Returns a copy of the internal elliptic curve key.

This corresponds to EVP_PKEY_get1_EC_KEY.

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

[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.

[src]

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

This corresponds to i2d_PUBKEY.

[src]

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.

[src]

Compares the public component of this key with another.

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

[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.

[src]

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.

[src]

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

This corresponds to i2d_PrivateKey.

Trait Implementations

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

The raw C type.

[src]

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

[src]

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

[src]

Returns a raw pointer to the wrapped value.

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

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