Sha256: 1c827cb1317155bffd6b7a01c49fd896fe4129d4f4cde0e1ce0d6e4154bb1855

Contents?: true

Size: 1.04 KB

Versions: 275

Compression:

Stored size: 1.04 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

275 entries across 232 versions & 29 rubygems

Version Path
net-ssh-2.0.14 lib/net/ssh/transport/identity_cipher.rb
poolparty-1.3.15 vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb
poolparty-1.3.14 vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb
poolparty-1.3.13 vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb
poolparty-1.3.8 vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb
poolparty-1.3.7 vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb
poolparty-1.3.6 vendor/gems/net-ssh/lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.13 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.11 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.8 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.10 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.5 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.7 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.6 lib/net/ssh/transport/identity_cipher.rb
net-ssh-2.0.9 lib/net/ssh/transport/identity_cipher.rb