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

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



10
11
12
13
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 10

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

Instance Method Details

#block_sizeObject



19
20
21
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 19

def block_size
  self.class::BLOCK_SIZE
end

#decrypt(data) ⇒ Object



35
36
37
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 35

def decrypt data
  data
end

#encrypt(data) ⇒ Object



31
32
33
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 31

def encrypt data
  data
end

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



15
16
17
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 15

def initialize direction=nil, iv=nil, key=nil
  @logger = Logger.new(self.class.name)
end

#iv_lengthObject



23
24
25
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 23

def iv_length
  self.class::IV_LENGTH
end

#key_lengthObject



27
28
29
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 27

def key_length
  self.class::KEY_LENGTH
end