logo
pub struct RsaPublicKey { /* private fields */ }
Expand description

Represents the public part of an RSA key.

Implementations

This is supported on crate feature alloc only.

Create a new key from its components.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize object from ASN.1 DER-encoded SubjectPublicKeyInfo (binary format). Read more

Deserialize SPKI public key from a PublicKeyDocument.

Deserialize PEM-encoded SubjectPublicKeyInfo. Read more

Load public key object from an ASN.1 DER-encoded file on the local filesystem (binary format). Read more

Load public key object from a PEM-encoded file on the local filesystem.

Deserialize this value from the given Serde deserializer. Read more

Serialize a PublicKeyDocument containing a SPKI-encoded public key.

Serialize this public key as PEM-encoded SPKI with the given LineEnding.

Write ASN.1 DER-encoded public key to the given path

Write ASN.1 DER-encoded public key to the given path

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Encrypt the given message.

Verify a signed message. hashedmust be the result of hashing the input using the hashing function passed in through hash. If the message is valid Ok(()) is returned, otherwiese an Err indicating failure. Read more

Encrypt the given message.

Verify a signed message. hashedmust be the result of hashing the input using the hashing function passed in through hash. If the message is valid Ok(()) is returned, otherwiese an Err indicating failure. Read more

Returns the modulus of the key.

Returns the public exponent of the key.

Returns the modulus size in bytes. Raw signatures and ciphertexts for or by this public key will have the same size. Read more

Returns the modulus of the key.

Returns the public exponent of the key.

Returns the modulus size in bytes. Raw signatures and ciphertexts for or by this public key will have the same size. Read more

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

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

Deserialize object from ASN.1 DER-encoded [RsaPublicKey] (binary format). Read more

Deserialize PEM-encoded [RsaPublicKey]. Read more

Load [RsaPublicKey] from an ASN.1 DER-encoded file on the local filesystem (binary format). Read more

Load [RsaPublicKey] from a PEM-encoded file on the local filesystem.

Serialize a RsaPublicKeyDocument containing a PKCS#1-encoded public key.

Serialize this public key as PEM-encoded PKCS#1 with the given line ending.

Write ASN.1 DER-encoded public key to the given path.

Write ASN.1 DER-encoded public key to the given path.

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

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.