class

OpenSSL::RSA

Inherits Reference < Object

RSA key.

A private or public key backed by an EVP_PKEY handle.

Constructors

generate(bit_size : Int, exponent : Int) : RSA

Generates an RSA private key.

Source
new(pem : String, is_private : Bool) : RSA

Parses a key from a PEM string.

Source

Instance methods

finalize
Source
private?

Reports whether this is a private key.

Source
public_key

Builds a public key from the public portion of this key.

Source
sign(digest : OpenSSL::Digest, data : String) : Bytes

Signs data using digest and returns signature.

Source
to_pem

Serializes to a PEM string.

Source
to_unsafe
Source
verify(digest : OpenSSL::Digest, signature : Bytes, data : String) : Bool

Verifies signature against data and a digest.

Source

Nested types