Module Net::SSH::Transport::HMAC
In: lib/net/ssh/transport/hmac/abstract.rb
lib/net/ssh/transport/hmac/md5.rb
lib/net/ssh/transport/hmac/md5_96.rb
lib/net/ssh/transport/hmac/none.rb
lib/net/ssh/transport/hmac/sha1.rb
lib/net/ssh/transport/hmac/sha1_96.rb
lib/net/ssh/transport/hmac.rb
lib/net/ssh/transport/hmac/abstract.rb
lib/net/ssh/transport/hmac/md5.rb
lib/net/ssh/transport/hmac/md5_96.rb
lib/net/ssh/transport/hmac/none.rb
lib/net/ssh/transport/hmac/sha1.rb
lib/net/ssh/transport/hmac/sha1_96.rb
lib/net/ssh/transport/hmac.rb

Implements a simple factory interface for fetching hmac implementations, or for finding the key lengths for hmac implementations.s

Methods

get   get   key_length   key_length  

Classes and Modules

Class Net::SSH::Transport::HMAC::Abstract
Class Net::SSH::Transport::HMAC::MD5
Class Net::SSH::Transport::HMAC::MD5_96
Class Net::SSH::Transport::HMAC::None
Class Net::SSH::Transport::HMAC::SHA1
Class Net::SSH::Transport::HMAC::SHA1_96

Constants

MAP = { 'hmac-md5' => MD5, 'hmac-md5-96' => MD5_96, 'hmac-sha1' => SHA1, 'hmac-sha1-96' => SHA1_96, 'none' => None   The mapping of SSH hmac algorithms to their implementations
MAP = { 'hmac-md5' => MD5, 'hmac-md5-96' => MD5_96, 'hmac-sha1' => SHA1, 'hmac-sha1-96' => SHA1_96, 'none' => None   The mapping of SSH hmac algorithms to their implementations

Public Class methods

Retrieves a new hmac instance of the given SSH type (name). If key is given, the new instance will be initialized with that key.

[Source]

    # File lib/net/ssh/transport/hmac.rb, line 21
21:   def self.get(name, key="")
22:     impl = MAP[name] or raise ArgumentError, "hmac not found: #{name.inspect}"
23:     impl.new(key)
24:   end

Retrieves a new hmac instance of the given SSH type (name). If key is given, the new instance will be initialized with that key.

[Source]

    # File lib/net/ssh/transport/hmac.rb, line 21
21:   def self.get(name, key="")
22:     impl = MAP[name] or raise ArgumentError, "hmac not found: #{name.inspect}"
23:     impl.new(key)
24:   end

Retrieves the key length for the hmac of the given SSH type (name).

[Source]

    # File lib/net/ssh/transport/hmac.rb, line 27
27:   def self.key_length(name)
28:     impl = MAP[name] or raise ArgumentError, "hmac not found: #{name.inspect}"
29:     impl.key_length
30:   end

Retrieves the key length for the hmac of the given SSH type (name).

[Source]

    # File lib/net/ssh/transport/hmac.rb, line 27
27:   def self.key_length(name)
28:     impl = MAP[name] or raise ArgumentError, "hmac not found: #{name.inspect}"
29:     impl.key_length
30:   end

[Validate]