cout<<"Enter a hint to help you remember this password: "<<flush;
cout<<"Enter a hint to help you remember this password: "<<flush;
getline(cin,hint);
getline(cin,hint);
@ -97,9 +97,8 @@ public:
ExportBare,
ExportBare,
RecodeBare,
RecodeBare,
KillBare,
KillBare,
FirstWallet,
CreateWallet,
CreateWallet,
List=FirstWallet,
List,
New,
New,
Import,
Import,
Export,
Export,
@ -112,9 +111,7 @@ public:
boolinterpretOption(int&i,intargc,char**argv)
boolinterpretOption(int&i,intargc,char**argv)
{
{
stringarg=argv[i];
stringarg=argv[i];
if(arg=="-n"||arg=="--new")
if(arg=="--wallet-path"&&i+1<argc)
m_mode=OperationMode::New;
elseif(arg=="--wallet-path"&&i+1<argc)
m_walletPath=argv[++i];
m_walletPath=argv[++i];
elseif(arg=="--secrets-path"&&i+1<argc)
elseif(arg=="--secrets-path"&&i+1<argc)
m_secretsPath=argv[++i];
m_secretsPath=argv[++i];
@ -192,7 +189,7 @@ public:
else
else
wallet.create(m_masterPassword);
wallet.create(m_masterPassword);
}
}
elseif(m_mode<OperationMode::FirstWallet)
elseif(m_mode<OperationMode::CreateWallet)
{
{
SecretStorestore(m_secretsPath);
SecretStorestore(m_secretsPath);
switch(m_mode)
switch(m_mode)
@ -285,17 +282,16 @@ public:
{
{
caseOperationMode::New:
caseOperationMode::New:
{
{
cout<<"Enter a description of this key: "<<flush;
stringinfo;
getline(cin,info);
tie(m_lock,m_lockHint)=createPassword(wallet,"Enter a password with which to secure this account (or nothing to use the master password): ",m_lock,m_lockHint);
tie(m_lock,m_lockHint)=createPassword(wallet,"Enter a password with which to secure this account (or nothing to use the master password): ",m_lock,m_lockHint);