Class: Izokatu::Decrypter Abstract
- Inherits:
-
Object
- Object
- Izokatu::Decrypter
- Extended by:
- Callable
- Includes:
- Contracts
- Defined in:
- lib/izokatu/decrypter.rb
Overview
This class is abstract.
Subclasses are containing implementation of #decrypt_data!
Abstract class for decrypters
Direct Known Subclasses
Openssl::PrivateKey::Default::Decrypter, Openssl::PublicKey::EC::Decrypter, Openssl::PublicKey::RSA::Decrypter, Rbnacl::Decrypter
Instance Attribute Summary collapse
-
#decrypted_data ⇒ Hash
readonly
Decrypted data for export.
-
#decrypter ⇒ Object
readonly
Decrypter instance.
-
#encrypted_data ⇒ String
readonly
Encrypted data for decryption.
Instance Method Summary collapse
-
#decrypt_data! ⇒ Object
private
Decrypting data.
-
#import_encrypted_data!(encrypted_data) ⇒ String
Importing encrypted data from param.
-
#initialize(encrypted_data:) ⇒ Decrypter
constructor
Initializing option for decryption.
-
#perform ⇒ Hash
Performing data decryption.
Methods included from Callable
Constructor Details
#initialize(encrypted_data:) ⇒ Decrypter
Initializing option for decryption
25 26 27 |
# File 'lib/izokatu/decrypter.rb', line 25 def initialize(encrypted_data:) import_encrypted_data!(encrypted_data) end |
Instance Attribute Details
#decrypted_data ⇒ Hash (readonly)
Returns decrypted data for export.
17 18 19 |
# File 'lib/izokatu/decrypter.rb', line 17 def decrypted_data @decrypted_data end |
#decrypter ⇒ Object (readonly)
Returns decrypter instance.
13 14 15 |
# File 'lib/izokatu/decrypter.rb', line 13 def decrypter @decrypter end |
#encrypted_data ⇒ String (readonly)
Returns encrypted data for decryption.
15 16 17 |
# File 'lib/izokatu/decrypter.rb', line 15 def encrypted_data @encrypted_data end |
Instance Method Details
#decrypt_data! ⇒ Object (private)
Decrypting data
58 59 60 |
# File 'lib/izokatu/decrypter.rb', line 58 def decrypt_data! raise 'Not implemented!' end |
#import_encrypted_data!(encrypted_data) ⇒ String
Importing encrypted data from param
37 38 39 |
# File 'lib/izokatu/decrypter.rb', line 37 def import_encrypted_data!(encrypted_data) @encrypted_data = encrypted_data end |
#perform ⇒ Hash
Performing data decryption
47 48 49 |
# File 'lib/izokatu/decrypter.rb', line 47 def perform decrypt_data! end |