From 0053cb1bd48b8aa7e3535045f99f24a562f5d264 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 20 Jul 2011 21:02:30 +0200 Subject: Documentation updates --- lib/App/Raps2.pm | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'lib/App/Raps2.pm') diff --git a/lib/App/Raps2.pm b/lib/App/Raps2.pm index 897e62e..dd00e54 100644 --- a/lib/App/Raps2.pm +++ b/lib/App/Raps2.pm @@ -275,6 +275,7 @@ sub pw_load_info { url => $key->{url}, login => $key->{login}, salt => $key->{salt}, + cost => $key->{cost}, }; } @@ -316,14 +317,25 @@ Accepted configuration parameters are: B of key setup, passed on to App::Raps2::Password(3pm). +Default: 12 + =item B => I If set to true, App::Raps2 assumes it will not be used as a CLI. It won't initialize its Term::ReadLine object and won't try to read anything from the terminal. +=item B => I + +Command to use in B. + +Default: pwgen -s 23 1 + =back +Note that the B and B options specified here take precedence +over those loaded from the config file. + =item $raps2->get_master_password( [I<$password>] ) Sets the master password used to encrypt all accounts. Uses I if @@ -334,8 +346,8 @@ specified, otherwise it asks the user via App::Raps2::UI(3pm). Load a password from I (or account I), requires B to have been called before. -Returns a hashref containing its url, login, salt and decrypted password and -extra. +Returns a hashref containing its url, login, salt, cost and decrypted password +and extra. =item $raps2->pw_load_info( B => I | B => I ) @@ -343,7 +355,7 @@ Load all unencrypted data from I (or account I). Unlike B, this method does not require a prior call to B. -Returns a hashref with url, login and salt. +Returns a hashref with url, login, salt and cost. =item $raps2->pw_save( I<%data> ) @@ -358,6 +370,8 @@ The following I keys are supported: =item B => I +=item B => I (optional, inferred from B / the config otherwise) + =item B => I | B => I (one must be set) =item B => I (optional) @@ -372,6 +386,16 @@ The following I keys are supported: Returns the App::Raps2::UI(3pm) object. +=item $raps2->conf(I) + +Returns the current config value of I, either set by B or loaded +from the defaults config file. + +=item $raps2->generate_password() + +Runs B (as specified in B or the config file) and returns its +first line of output, without the trailing newline. + =back =head2 INTERNAL @@ -382,12 +406,21 @@ You usually don't need to call these methods by yourself. =item $raps2->create_config() -Creates a default config and asks the user to set a master password. +Creates a password file and asks the user to set a master password. =item $raps2->load_config() Load config. Automatically called by B. +=item $raps2->create_defaults() + +Creates a defaults config file containing the default key setup cost and pwgen +command. + +=item $raps2->load_defaults() + +Loads the defaults file. Automatically called by B. + =item $raps2->pw() Returns the App::Raps2::Password(3pm) object. @@ -403,7 +436,7 @@ Create working directories (~/.config/raps2 and ~/.local/share/raps2, or the respective XDG environment variable contents), if they don't exist yet. Automatically called by B. -Calls B if no raps2 config was found. +Calls B and B if no configs were found. =back @@ -420,6 +453,8 @@ File::Slurp(3pm). =head1 BUGS AND LIMITATIONS Be aware that the password handling API is not yet stable. +Also, so far the development concentrated on B, so this module / its +documentation may not be completely up-to-date. =head1 AUTHOR -- cgit v1.2.3