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.



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

def block_size
  8
end

.decryptObject

Does nothing. Returns self.



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

def decrypt
  self
end

.encryptObject

Does nothing. Returns self.



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

def encrypt
  self
end

.finalObject

Returns the empty string.



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

def final
  ""
end

.iv=(v) ⇒ Object

Does nothing. Returns nil.



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

def iv=(v)
  nil
end

.iv_lenObject

Returns an arbitrary integer.



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

def iv_len
  4
end

.nameObject

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



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

def name
  "identity"
end

.resetObject

Does nothing. Returns self.



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

def reset
  self
end

.update(text) ⇒ Object

Passes its single argument through unchanged.



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

def update(text)
  text
end