class ConfConf::User::Config

Public Class Methods

path() click to toggle source
# File lib/conf_conf/user.rb, line 15
def self.path
  File.join(File.expand_path('~'), '.conf_conf.json')
end

Private Instance Methods

generate_keys!() click to toggle source
# File lib/conf_conf/user.rb, line 31
def generate_keys!
  @key ||= RbNaCl::PrivateKey.generate
  @private_key = Base64.strict_encode64(@key.to_s)
  @public_key = Base64.strict_encode64(@key.public_key.to_s)
end
new_private_key() click to toggle source
# File lib/conf_conf/user.rb, line 27
def new_private_key
  generate_keys! and @private_key
end
new_public_key() click to toggle source
# File lib/conf_conf/user.rb, line 23
def new_public_key
  generate_keys! and @public_key
end