plebble
us::gov::io::cfg1 Class Reference

#include <cfg1.h>

Inheritance diagram for us::gov::io::cfg1:
Collaboration diagram for us::gov::io::cfg1:

Public Types

typedef cfg0 b
 
typedef crypto::ec::keys keys_t
 

Public Member Functions

virtual ~cfg1 ()
 
 cfg1 (const keys_t::priv_t &privk, const string &home)
 
 cfg1 (const cfg1 &other)
 
 cfg1 (PrivateKey privk, String home_)
 
 cfg1 (cfg1 other)
 
- Public Member Functions inherited from us::gov::io::cfg0
virtual ~cfg0 ()
 
 cfg0 (const string &home)
 
 cfg0 (const cfg0 &other)
 
 cfg0 (String home_)
 
 cfg0 (cfg0 other)
 

Static Public Member Functions

static pair< us::ko, keys_t::priv_tload_sk (const string &home)
 
static string k_file (const string &home)
 
static ko write_k (const string &home, const keys_t::priv_t &priv)
 
static pair< ko, cfg1 * > load (const string &home, bool gen)
 
static String k_file (String home)
 
static ko write_k (String home, PrivateKey priv)
 
static String read_file (String path, Charset encoding) throws IOException
 
static pair< ko, PrivateKey > load_sk (String home)
 
static pair< ko, cfg1load (String home, boolean gen)
 
- Static Public Member Functions inherited from us::gov::io::cfg0
static void check_platform ()
 
static bool is_big_endian ()
 
static bool mkdir (const string &d)
 
static bool file_exists (const string &f)
 
static uint32_t file_size (const string &f)
 
static bool ensure_dir (const string &d)
 
static string rewrite_path (const string &)
 
static bool dir_exists (const string &d)
 
static string abs_file (const string &home, const string &fn)
 
static void mkdir_tree (string sub, string dir)
 
static pair< us::ko, cfg0load (const string &home)
 
static void trim (string &)
 
static void to_identifier (string &)
 
static string directory_of_file (const string &file)
 
static bool ensure_writable (const string &file)
 
static string file_content (const string &file)
 
static void check_platform ()
 
static String abs_file (String home, String fn)
 
static boolean dir_exists (String d)
 
static boolean file_exists (String s)
 
static boolean ensure_dir (String d)
 
static pair< ko, cfg0load (String home)
 
static String rewrite_path (String d)
 
static byte[] read_file (String filename)
 
static String read_text_file (String filename)
 

Public Attributes

keys_t keys
 
KeyPair keys
 
- Public Attributes inherited from us::gov::io::cfg0
string home
 

Static Public Attributes

static const char * KO_97832
 
static const char * KO_96857
 
static const char * KO_30291
 
static const char * KO_50493
 
static const char * KO_60987
 
static final ko KO_30291 =new ko("KO 30291 invalid k file.")
 
static final ko KO_97832 =new ko("KO 97832 Secret key not found.")
 
static final ko KO_96857 =new ko("KO 96857 Invalid private key.")
 
static final ko KO_50493 =new ko("KO 50493 Cannot create home dir.")
 
static final ko KO_97032 =new ko("KO 97032 Cannot create k file.")
 
static final ko KO_60593 =new ko("KO 60593 Failure generating keys.")
 
static final ko KO_86059 =new ko("KO 86059 Unable to set posix permissions.")
 
- Static Public Attributes inherited from us::gov::io::cfg0
static const char * KO_96857
 
static const char * KO_60534
 
static final ko KO_60534 =new ko("KO 60534 Cannot create home dir.")
 

Additional Inherited Members

- Package Attributes inherited from us::gov::io::cfg0
String home
 

Member Typedef Documentation

◆ b

◆ keys_t

Constructor & Destructor Documentation

◆ ~cfg1()

virtual us::gov::io::cfg1::~cfg1 ( )
virtual

◆ cfg1() [1/4]

us::gov::io::cfg1::cfg1 ( const keys_t::priv_t privk,
const string &  home 
)

Referenced by load().

Here is the caller graph for this function:

◆ cfg1() [2/4]

us::gov::io::cfg1::cfg1 ( const cfg1 other)

◆ cfg1() [3/4]

us.gov.io.cfg1.cfg1 ( PrivateKey  privk,
String  home_ 
)
inline

References us::gov::crypto::ec.generate_keypair(), us::gov::crypto::ec.instance, and keys.

Here is the call graph for this function:

◆ cfg1() [4/4]

us.gov.io.cfg1.cfg1 ( cfg1  other)
inline

References keys.

Member Function Documentation

◆ k_file() [1/2]

static string us::gov::io::cfg1::k_file ( const string &  home)
static

Referenced by load(), load_sk(), and write_k().

Here is the caller graph for this function:

◆ k_file() [2/2]

static String us.gov.io.cfg1.k_file ( String  home)
inlinestatic

References us::gov::io::cfg0.abs_file(), and us::gov::io::cfg0.home.

Here is the call graph for this function:

◆ load() [1/2]

static pair<ko,cfg1*> us::gov::io::cfg1::load ( const string &  home,
bool  gen 
)
static

Referenced by us.wallet.cli.hmi::load_cfg(), and us.wallet.cli.hmi::run_offline().

Here is the caller graph for this function:

◆ load() [2/2]

◆ load_sk() [1/2]

static pair<us::ko,keys_t::priv_t> us::gov::io::cfg1::load_sk ( const string &  home)
static

Referenced by load().

Here is the caller graph for this function:

◆ load_sk() [2/2]

static pair<ko, PrivateKey> us.gov.io.cfg1.load_sk ( String  home)
inlinestatic

◆ read_file()

static String us.gov.io.cfg1.read_file ( String  path,
Charset  encoding 
) throws IOException
inlinestatic

Referenced by load_sk().

Here is the caller graph for this function:

◆ write_k() [1/2]

static ko us::gov::io::cfg1::write_k ( const string &  home,
const keys_t::priv_t priv 
)
static

Referenced by load().

Here is the caller graph for this function:

◆ write_k() [2/2]

static ko us.gov.io.cfg1.write_k ( String  home,
PrivateKey  priv 
)
inlinestatic

Member Data Documentation

◆ keys [1/2]

keys_t us::gov::io::cfg1::keys

◆ keys [2/2]

KeyPair us.gov.io.cfg1.keys

◆ KO_30291 [1/2]

const char* us::gov::io::cfg1::KO_30291
static

◆ KO_30291 [2/2]

final ko us.gov.io.cfg1.KO_30291 =new ko("KO 30291 invalid k file.")
static

◆ KO_50493 [1/2]

const char* us::gov::io::cfg1::KO_50493
static

Referenced by write_k().

◆ KO_50493 [2/2]

final ko us.gov.io.cfg1.KO_50493 =new ko("KO 50493 Cannot create home dir.")
static

◆ KO_60593

final ko us.gov.io.cfg1.KO_60593 =new ko("KO 60593 Failure generating keys.")
static

Referenced by load().

◆ KO_60987

const char* us::gov::io::cfg1::KO_60987
static

◆ KO_86059

final ko us.gov.io.cfg1.KO_86059 =new ko("KO 86059 Unable to set posix permissions.")
static

◆ KO_96857 [1/2]

const char* us::gov::io::cfg1::KO_96857
static

Referenced by load_sk().

◆ KO_96857 [2/2]

final ko us.gov.io.cfg1.KO_96857 =new ko("KO 96857 Invalid private key.")
static

◆ KO_97032

final ko us.gov.io.cfg1.KO_97032 =new ko("KO 97032 Cannot create k file.")
static

Referenced by write_k().

◆ KO_97832 [1/2]

const char* us::gov::io::cfg1::KO_97832
static

Referenced by load().

◆ KO_97832 [2/2]

final ko us.gov.io.cfg1.KO_97832 =new ko("KO 97832 Secret key not found.")
static

The documentation for this class was generated from the following files: