Module: HrrRbSsh::Transport::EncryptionAlgorithm::Unfunctionable

Includes:
Loggable
Included in:
None
Defined in:
lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb

Instance Attribute Summary

Attributes included from Loggable

#log_key, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Loggable

#log_debug, #log_error, #log_fatal, #log_info, #log_warn

Class Method Details

.included(klass) ⇒ Object



12
13
14
15
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 12

def self.included klass
  klass.const_set(:IV_LENGTH,  0)
  klass.const_set(:KEY_LENGTH, 0)
end

Instance Method Details

#block_sizeObject



21
22
23
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 21

def block_size
  self.class::BLOCK_SIZE
end

#decrypt(data) ⇒ Object



37
38
39
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 37

def decrypt data
  data
end

#encrypt(data) ⇒ Object



33
34
35
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 33

def encrypt data
  data
end

#initialize(direction = nil, iv = nil, key = nil, logger: nil) ⇒ Object



17
18
19
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 17

def initialize direction=nil, iv=nil, key=nil, logger: nil
  self.logger = logger
end

#iv_lengthObject



25
26
27
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 25

def iv_length
  self.class::IV_LENGTH
end

#key_lengthObject



29
30
31
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 29

def key_length
  self.class::KEY_LENGTH
end