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.


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

def block_size
  8
end

.decryptObject

Does nothing. Returns self.


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

def decrypt
  self
end

.encryptObject

Does nothing. Returns self.


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

def encrypt
  self
end

.finalObject

Returns the empty string.


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

def final
  ""
end

.iv=(v) ⇒ Object

Does nothing. Returns nil.


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

def iv=(v)
  nil
end

.iv_lenObject

Returns an arbitrary integer.


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

def iv_len
  4
end

.nameObject

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


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

def name
  "identity"
end

.resetObject

Does nothing. Returns self.


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

def reset
  self
end

.update(text) ⇒ Object

Passes its single argument through unchanged.


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

def update(text)
  text
end