Class Nanite::RsaKeyPair
In: lib/nanite/security/rsa_key_pair.rb
Parent: Object

Allows generating RSA key pairs and extracting public key component Note: Creating a RSA key pair can take a fair amount of time (seconds)

Methods

data   from_data   has_private?   load   new   save   to_public   to_s  

Constants

DEFAULT_LENGTH = 2048

Attributes

raw_key  [R]  Underlying OpenSSL keys

Public Class methods

Load key pair previously serialized via ‘data

Load key from file

Create new RSA key pair using ‘length’ bits

Public Instance methods

Key material in PEM format

Does key pair include private key?

Save key to file in PEM format

New RsaKeyPair instance with identical public key but no private key

to_s()

Alias for data

[Validate]