def initialize( argv = ARGV )
@named_options = Hash.new
@run_app = true
@keying_algorithm = "unkeyed"
OptionParser.new do |opts|
opts.banner = "Usage: #{$0} [options] [strings]"
opts.separator ""
opts.on( "-o", "--option NAME=VALUE",
"Specify a named value, for use by a component of the cipher."
) do |pair|
name, value = pair.split( / *= */, 2 )
@named_options[ name ] = value
end
opts.on( "-k", "--key NAME", "Specify the keying algorithm to use" ) do |value|
@keying_algorithm = value
end
opts.separator ""
opts.on_tail( "-h", "--help", "This help text" ) do
puts opts
@run_app = false
end
opts.parse!( argv )
end
@strings = argv
end