class Izokatu::Encrypter
Abstract class for encrypters
@abstract Subclasses are containing implementation of {#encrypt_data!}
Constants
- DEFAULT_OPTIONS
Default options for
Izokatu::Encrypter
Attributes
clear_data[R]
@return [String] clear data for encryption
encrypted_data[R]
@return [Hash] encrypted data for export
encrypter[R]
@return encrypter instance
Public Class Methods
new(clear_data:)
click to toggle source
Initializing option for encryption
@param clear_data
(clear_data
)
@since 0.1.0
# File lib/izokatu/encrypter.rb, line 30 def initialize(clear_data:) import_clear_data!(clear_data) end
Public Instance Methods
import_clear_data!(clear_data)
click to toggle source
Imporing clear data from options
@param clear_data
(clear_data
)
@return [String] (clear_data
)
@since 0.1.0
# File lib/izokatu/encrypter.rb, line 42 def import_clear_data!(clear_data) @clear_data = clear_data || DEFAULT_OPTIONS[:clear_data_string] end
perform()
click to toggle source
Performing encryption
@return [Hash] encrypted data with params
@since 0.1.0
# File lib/izokatu/encrypter.rb, line 52 def perform encrypt_data! end
Private Instance Methods
encrypt_data!()
click to toggle source
Encrypting data`
@raise RuntimeError
@since 0.1.0
# File lib/izokatu/encrypter.rb, line 63 def encrypt_data! raise 'Not implemented!' end