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



8
9
10
11
# File 'lib/hrr_rb_ssh/transport/encryption_algorithm/unfunctionable.rb', line 8

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

Instance Method Details

#block_sizeObject



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

def block_size
  self.class::BLOCK_SIZE
end

#decrypt(data) ⇒ Object



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

def decrypt data
  data
end

#encrypt(data) ⇒ Object



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

def encrypt data
  data
end

#iv_lengthObject



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

def iv_length
  self.class::IV_LENGTH
end

#key_lengthObject



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

def key_length
  self.class::KEY_LENGTH
end