Class: Net::SSH::Transport::IdentityCipher

Inherits:
Object
  • Object
show all
Defined in:
lib/net/ssh/transport/identity_cipher.rb

Overview

A cipher that does nothing but pass the data through, unchanged. This keeps things in the code nice and clean when a cipher has not yet been determined (i.e., during key exchange).

Class Method Summary collapse

Class Method Details

.block_sizeObject

A default block size of 8 is required by the SSH2 protocol.



9
10
11
# File 'lib/net/ssh/transport/identity_cipher.rb', line 9

def block_size
  8
end

.decryptObject

Does nothing. Returns self.



24
25
26
# File 'lib/net/ssh/transport/identity_cipher.rb', line 24

def decrypt
  self
end

.encryptObject

Does nothing. Returns self.



19
20
21
# File 'lib/net/ssh/transport/identity_cipher.rb', line 19

def encrypt
  self
end

.finalObject

Returns the empty string.



34
35
36
# File 'lib/net/ssh/transport/identity_cipher.rb', line 34

def final
  ""
end

.iv=(v) ⇒ Object

Does nothing. Returns nil.



44
45
46
# File 'lib/net/ssh/transport/identity_cipher.rb', line 44

def iv=(v)
  nil
end

.iv_lenObject

Returns an arbitrary integer.



14
15
16
# File 'lib/net/ssh/transport/identity_cipher.rb', line 14

def iv_len
  4
end

.nameObject

The name of this cipher, which is “identity”.



39
40
41
# File 'lib/net/ssh/transport/identity_cipher.rb', line 39

def name
  "identity"
end

.resetObject

Does nothing. Returns self.



49
50
51
# File 'lib/net/ssh/transport/identity_cipher.rb', line 49

def reset
  self
end

.update(text) ⇒ Object

Passes its single argument through unchanged.



29
30
31
# File 'lib/net/ssh/transport/identity_cipher.rb', line 29

def update(text)
  text
end