def self.validate options
sources = [:password, :string, :file, :stdin, :eyaml].collect {|x| x if options[x]}.compact
Trollop::die "You must specify a source" if sources.count.zero?
Trollop::die "You can only specify one of (#{sources.join(', ')})" if sources.count > 1
options[:source] = sources.first
options[:input_data] = case options[:source]
when :password
Utils.read_password
when :string
options[:string]
when :file
File.read options[:file]
when :stdin
STDIN.read
when :eyaml
File.read options[:eyaml]
end
options
end