Sha256: 27ee8ffdf189885756803fdcbdc4714c1884ac8cc6db132e0aeefc6b267c4e68

Contents?: true

Size: 1.25 KB

Versions: 48

Compression:

Stored size: 1.25 KB

Contents

module Net 
  module SSH 
    module Transport

      # 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 IdentityCipher
        class <<self
          # A default block size of 8 is required by the SSH2 protocol.
          def block_size
            8
          end
    
          # Returns an arbitrary integer.
          def iv_len
            4
          end
    
          # Does nothing. Returns self.
          def encrypt
            self
          end
    
          # Does nothing. Returns self.
          def decrypt
            self
          end
    
          # Passes its single argument through unchanged.
          def update(text)
            text
          end
    
          # Returns the empty string.
          def final
            ""
          end
    
          # The name of this cipher, which is "identity".
          def name
            "identity"
          end
    
          # Does nothing. Returns nil.
          def iv=(v)
            nil
          end
    
          # Does nothing. Returns self.
          def reset
            self
          end
        end
      end

    end
  end
end

Version data entries

48 entries across 41 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/net-ssh-6.2.0.rc1/lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.2.0.rc2 lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/net-ssh-6.2.0.rc1/lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/net-ssh-6.1.0/lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.2.0.rc1 lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.2.0.beta1 lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.1.0 lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/net-ssh-5.2.0/lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.1.0.rc1 lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.0.2 lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.0.1 lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.0.0 lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.0.0.rc1 lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/net-ssh-5.1.0/lib/net/ssh/transport/identity_cipher.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/net-ssh-5.1.0/lib/net/ssh/transport/identity_cipher.rb
net-ssh-6.0.0.beta2 lib/net/ssh/transport/identity_cipher.rb