Class: Sandal::Enc::Alg::RSA_OAEP

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

Overview

The RSA-OAEP key encryption algorithm.

Constant Summary collapse

NAME =

The JWA name of the algorithm.

"RSA-OAEP"

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) ⇒ RSA_OAEP

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



74
75
76
# File 'lib/sandal/enc/alg/rsa.rb', line 74

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