mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
removed small bugs in test program
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5375 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f835e83ff9
commit
b257ada1fd
@ -7,7 +7,12 @@
|
||||
|
||||
static std::string passphrase_callback(void *data,const char *uid_info,const char *what,int prev_was_bad)
|
||||
{
|
||||
return std::string(getpass(what)) ;
|
||||
if(prev_was_bad)
|
||||
std::cerr << "Bad passphrase." << std::endl;
|
||||
|
||||
std::string wt = std::string("Please enter passphrase for key id ") + uid_info + " :";
|
||||
|
||||
return std::string(getpass(wt.c_str())) ;
|
||||
}
|
||||
|
||||
static std::string stringFromBytes(unsigned char *bytes,size_t len)
|
||||
@ -260,7 +265,7 @@ int main(int argc,char *argv[])
|
||||
std::cerr << "Encryption success" << std::endl;
|
||||
|
||||
std::string decrypted_text = "" ;
|
||||
outfile = "crypted_toto2.pgp" ;
|
||||
outfile = "crypted_toto.pgp" ;
|
||||
|
||||
if(!pgph.decryptTextFromFile(key_id,decrypted_text,outfile))
|
||||
std::cerr << "Decryption failed" << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user