def register_services( container )
container.namespace_define :hmac do |space|
%w{sha1 sha1-96 md5 md5-96}.each do |name|
space.__send__( name.sub(/-/, "_").intern ) do
require "net/ssh/transport/ossl/hmac/#{name}"
const_get( name.upcase.sub(/-/, "_").intern ).new
end
end
space.none do
require "net/ssh/transport/ossl/hmac/none"
None.new
end
space.collection do |c,|
Hash[ "hmac-sha1" => c.sha1,
"hmac-sha1-96" => c.sha1_96,
"hmac-md5" => c.md5,
"hmac-md5-96" => c.md5_96,
"none" => c.none ]
end
if space.knows_key?( :hmac_algorithm_sources )
space.hmac_algorithm_sources << space.collection
end
end
end