libbb: add optionl support for SHA256/512 encrypted passwords

function                                             old     new   delta
sha_crypt                                              -    2423   +2423
cryptpw_main                                         128     183     +55
to64                                                   -      29     +29
pw_encrypt                                           974    1000     +26
str_rounds                                             -      11     +11
login_main                                          1532    1541      +9
packed_usage                                       25215   25200     -15
__md5_to64                                            29       -     -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/1 up/down: 2553/-44)         Total: 2509 bytes
This commit is contained in:
Denis Vlasenko
2008-11-10 18:52:35 +00:00
parent 56dceb9b77
commit 2211d5268c
7 changed files with 326 additions and 39 deletions

View File

@ -557,8 +557,13 @@
"\n -r Delete crontab" \
"\n FILE Replace crontab by FILE ('-': stdin)" \
#if !ENABLE_USE_BB_CRYPT || ENABLE_USE_BB_CRYPT_SHA
#define cryptpw_trivial_usage \
"[-a des|md5|sha256/512] [string]"
#else
#define cryptpw_trivial_usage \
"[-a des|md5] [string]"
#endif
#define cryptpw_full_usage "\n\n" \
"Output crypted string.\n" \
"If string isn't supplied on cmdline, read it from stdin.\n" \