Class: JWE::Alg::Dir

Inherits:
Object
  • Object
show all
Defined in:
lib/jwe/alg/dir.rb

Overview

Direct (no-op) key encryption algorithm.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ Dir

Returns a new instance of Dir.


7
8
9
# File 'lib/jwe/alg/dir.rb', line 7

def initialize(key)
  self.key = key
end

Instance Attribute Details

#keyObject

Returns the value of attribute key


5
6
7
# File 'lib/jwe/alg/dir.rb', line 5

def key
  @key
end

Instance Method Details

#decrypt(_encrypted_cek) ⇒ Object


15
16
17
# File 'lib/jwe/alg/dir.rb', line 15

def decrypt(_encrypted_cek)
  key
end

#encrypt(_cek) ⇒ Object


11
12
13
# File 'lib/jwe/alg/dir.rb', line 11

def encrypt(_cek)
  ''
end