Sha256: 40b54ebe85d2ccbeb427cee47052fd07a6d7e4848e19d67119ecfedd127e6c96

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

#!/usr/bin/env ruby
require "pathname"
bin_file = Pathname.new(__FILE__).realpath
$:.unshift File.expand_path("../../lib", bin_file)

require 'authenticated_client'
require 'yaml'
require 'json'

class Main

  def generate_keypair
    #create and configure auditing instance
    keypair_generator = AuthenticatedClient::KeypairGenerator.new
    private_key, public_key = keypair_generator.generate
    configuration = {
      'private_key' => private_key,
      'public_key' => public_key
    }
    puts "------------"
    puts "YAML Format:"
    puts "------------"
    print configuration.to_yaml
    puts ""
    puts "------------"
    puts "JSON Format:"
    puts "------------"
    print configuration.to_json
    puts ""
    puts ""
    puts "------------"

  end
end

main = Main.new
main.generate_keypair

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authenticated_client-0.0.3 bin/keypair-generator
authenticated_client-0.0.2 bin/keypair-generator
authenticated_client-0.0.1 bin/keypair-generator