Class: JWE::Alg::Dir
- Inherits:
-
Object
- Object
- JWE::Alg::Dir
- Defined in:
- lib/jwe/alg/dir.rb
Overview
Direct (no-op) key encryption algorithm.
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
- #decrypt(_encrypted_cek) ⇒ Object
- #encrypt(_cek) ⇒ Object
-
#initialize(key) ⇒ Dir
constructor
A new instance of Dir.
Constructor Details
#initialize(key) ⇒ Dir
Returns a new instance of Dir.
9 10 11 |
# File 'lib/jwe/alg/dir.rb', line 9 def initialize(key) self.key = key end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
7 8 9 |
# File 'lib/jwe/alg/dir.rb', line 7 def key @key end |
Instance Method Details
#decrypt(_encrypted_cek) ⇒ Object
17 18 19 |
# File 'lib/jwe/alg/dir.rb', line 17 def decrypt(_encrypted_cek) key end |
#encrypt(_cek) ⇒ Object
13 14 15 |
# File 'lib/jwe/alg/dir.rb', line 13 def encrypt(_cek) '' end |