mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* keygen.c (set_one_pref, keygen_set_std_prefs): Allow using the full
algorithm name (CAST5, SHA1) rather than the short form (S3, H2). * main.h, keygen.c (keygen_get_std_prefs), keyedit.c (keyedit_menu): Return and use a fake uid packet rather than a string since we already have a nice parser/printer in keyedit.c:show_prefs. * main.h, misc.c (string_to_compress_algo): New.
This commit is contained in:
parent
d6693c144c
commit
39e659312e
5 changed files with 129 additions and 84 deletions
19
g10/misc.c
19
g10/misc.c
|
@ -538,6 +538,25 @@ compress_algo_to_string(int algo)
|
|||
return s;
|
||||
}
|
||||
|
||||
int
|
||||
string_to_compress_algo(const char *string)
|
||||
{
|
||||
if(ascii_strcasecmp(string,"uncompressed")==0)
|
||||
return 0;
|
||||
else if(ascii_strcasecmp(string,"zip")==0)
|
||||
return 1;
|
||||
else if(ascii_strcasecmp(string,"zlib")==0)
|
||||
return 2;
|
||||
else if(ascii_strcasecmp(string,"z0")==0)
|
||||
return 0;
|
||||
else if(ascii_strcasecmp(string,"z1")==0)
|
||||
return 1;
|
||||
else if(ascii_strcasecmp(string,"z2")==0)
|
||||
return 2;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
check_compress_algo(int algo)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue