pub struct PKey<T> { /* private fields */ }
Expand description

This is a wrapper around an OpenSSL asymmetric key pair. Since openssl 0.10, the PKey is either a public or private key so we have to differentiate that as well.

Implementations

Signs the data using RSA-SHA1

Signs the data using RSA-SHA256

Signs the data using RSA-SHA256-PSS

Decrypts data in src to dst using the specified padding and returning the size of the decrypted data in bytes or an error.

Verifies the data using RSA-SHA1

Verifies the data using RSA-SHA256

Verifies the data using RSA-SHA256-PSS

Encrypts data from src to dst using the specified padding and returns the size of encrypted data in bytes or an error.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.