Class: Sandal::Enc::Alg::RSA1_5

Inherits:
RSA
  • Object
show all
Defined in:
lib/sandal/enc/alg/rsa.rb

Overview

The RSA1_5 key encryption algorithm.

Constant Summary collapse

NAME =

The JWA name of the algorithm.

"RSA1_5"

Instance Attribute Summary

Attributes inherited from RSA

#name

Instance Method Summary collapse

Methods inherited from RSA

#decrypt_key, #encrypt_key

Constructor Details

#initialize(rsa_key) ⇒ RSA1_5

Initialises a new instance.

(private). If the value is a String then it will be passed to the constructor of the RSA class. This must be at least 2048 bits to be compliant with the JWA specification.

Parameters:

  • rsa_key (OpenSSL::PKey::RSA or String)

    The RSA key to use for key encryption (public) or decryption



57
58
59
# File 'lib/sandal/enc/alg/rsa.rb', line 57

def initialize(rsa_key)
  super(NAME, rsa_key, OpenSSL::PKey::RSA::PKCS1_PADDING)
end