Re: [Dar-libdar_api] Re: problem compiling KDar with libdar CVS
For full, incremental, compressed and encrypted backups or archives
Brought to you by:
edrusb
|
From: Johnathan B. <jk...@us...> - 2004-11-07 17:03:41
|
Hi Denis, On Thursday 04 November 2004 10:47, Denis Corbin wrote: > Johnathan Burchill wrote: > | On Thursday 04 November 2004 02:27, Denis Corbin wrote: > |>Johnathan Burchill wrote: > | > |[...] > | > |>| calls dialog.warning(...) if the archive is encrypted and no > |>| password is given. Perhaps if "macro_tools_open_archive" could throw > |>| an Epassword() exception, that could be caught by the application, > |>| which could transparently ask the user for a password and try the > |>| read again. > |> > |>I like the idea, but throwing an exception is not a reversible > |> operation ~ from the stack point of view (you cannot continue > |> execution where it has been thrown). I suppose you mean that libdar > |> should rather use a the user_interaction::pause(...) method to ask > |> the password to the user, it the pass argument was something like > |> "bf:" or "scram:" where just the algorithm (the cypher) is given ? > | > | I didn't expect libdar to continue where it left off after issuing > | Epassword(). Just that it would be a way to inform the application to > | ask the user for a password and try again to read the archive from the > | beginning. > | > | However, your idea of using user_interaction::pause looks promising. I > > did > > | not think of that one because the current implementation seems to be > | able to handle boolean questions, not arbitrary responses. > > Yes you are right. user_interaction::pause() is only able to handle > boolean questions. Thus I had to add a new method to user_interaction > class: > > ~ std::string get_string(const std::string & message, bool echo); > I'd like to get your opinion on confirming passwords. When a user needs to enter a password to encrypt a file, I think he/she=20 should be asked to confirm what they entered. If the password is for=20 decryption, no confirmation should be required. Is this something that the application or libdar should be concerned about?= =20 If the application has to keep track of whether an archive is being=20 created or read, that is okay, but means repetitive coding for everyone=20 who uses libdar, and more complicated code at the application level. I'd=20 rather let libdar decide whether to confirm passwords, with a method like std::string get_string( const std::string & message, bool echo, bool=20 confirm ); What do you think? [...] JB =2D-=20 Johnathan K. Burchill, Ph.D. jk...@us... |