Struct xero::Rsa [] [src]

pub struct Rsa(_);

Methods

impl Rsa
[src]

only useful for associating the key material directly with the key, it's safer to use the supplied load and save methods for DER formatted keys.

Generates a public/private key pair with the specified size.

The public exponent will be 65537.

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 private key from DER-formatted data.

Deserializes a public key from PEM-formatted data.

Deserializes a public key from DER-formatted data.

Deprecated since 0.9.2

: use private_key_from_pem_callback

Methods from Deref<Target = RsaRef>

Serializes the private key to PEM.

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

Serializes a public key to PEM.

Serializes the private key to DER.

Serializes the public key to DER.

Decrypts data using the private key, returning the number of decrypted bytes.

Panics

Panics if self has no private components, or if to is smaller than self.size().

Encrypts data using the private key, returning the number of encrypted bytes.

Panics

Panics if self has no private components, or if to is smaller than self.size().

Decrypts data using the public key, returning the number of decrypted bytes.

Panics

Panics if to is smaller than self.size().

Encrypts data using the public key, returning the number of encrypted bytes.

Panics

Panics if to is smaller than self.size().

Trait Implementations

impl Deref for Rsa
[src]

impl ForeignType for Rsa
[src]

impl Debug for Rsa
[src]

Formats the value using the given formatter.

impl Drop for Rsa
[src]

impl DerefMut for Rsa
[src]