Class: Izokatu::Rbnacl::Decrypter Abstract
- Defined in:
- lib/izokatu/rbnacl/decrypter.rb
Overview
This class is abstract.
Subclasses are containing implementation of #create_decrypter!
Abstract class for Rbnacl decrypters
Direct Known Subclasses
Constant Summary collapse
- RBNACL_KEY_CLASSES =
Classes of RbNaCl keys
[ RbNaCl::Boxes::Curve25519XSalsa20Poly1305::PrivateKey, RbNaCl::Boxes::Curve25519XSalsa20Poly1305::PublicKey ].freeze
Instance Attribute Summary collapse
-
#nonce ⇒ String
readonly
Initialization vector for one-time use.
Attributes inherited from Decrypter
#decrypted_data, #decrypter, #encrypted_data
Instance Method Summary collapse
-
#create_decrypter! ⇒ Object
Creating decrypter instance.
-
#initialize(encrypted_data:, nonce:) ⇒ Decrypter
constructor
Initializing option for decryption.
Methods inherited from Decrypter
#decrypt_data!, #import_encrypted_data!, #perform
Methods included from Callable
Constructor Details
#initialize(encrypted_data:, nonce:) ⇒ Decrypter
Initializing option for decryption
26 27 28 29 30 |
# File 'lib/izokatu/rbnacl/decrypter.rb', line 26 def initialize(encrypted_data:, nonce:) super(encrypted_data: encrypted_data) @nonce = nonce create_decrypter! end |
Instance Attribute Details
#nonce ⇒ String (readonly)
Returns initialization vector for one-time use.
11 12 13 |
# File 'lib/izokatu/rbnacl/decrypter.rb', line 11 def nonce @nonce end |
Instance Method Details
#create_decrypter! ⇒ Object
Creating decrypter instance
37 38 39 |
# File 'lib/izokatu/rbnacl/decrypter.rb', line 37 def create_decrypter! raise 'Not implemented!' end |