Struct josekit::jwk::alg::rsa::RsaKeyPair[][src]

pub struct RsaKeyPair { /* fields omitted */ }

Implementations

Generate RSA key pair.

Arguments
  • bits - RSA key length

Create a RSA key pair from a private key that is a DER encoded PKCS#8 PrivateKeyInfo or PKCS#1 RSAPrivateKey.

Arguments
  • input - A private key that is a DER encoded PKCS#8 PrivateKeyInfo or PKCS#1 RSAPrivateKey.

Create a RSA key pair from a private key of common or traditinal PEM format.

Common PEM format is a DER and base64 encoded PKCS#8 PrivateKeyInfo that surrounded by “—–BEGIN/END PRIVATE KEY––”.

Traditional PEM format is a DER and base64 encoded PKCS#1 RSAPrivateKey that surrounded by “—–BEGIN/END RSA PRIVATE KEY––”.

Arguments
  • input - A private key of common or traditinal PEM format.

Create a RSA key pair from a private key that is formatted by a JWK of RSA type.

Arguments
  • jwk - A private key that is formatted by a JWK of RSA type.

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

The resulting type after dereferencing.

Dereferences the value.

Return the applicatable algorithm.

Return the applicatable key ID.

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.