mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: New %U expando for the photo viewer.
* g10/photoid.c (show_photos): Set namehash. * g10/misc.c (pct_expando): Add "%U" expando. -- This makes is possible to extract all photos ids from a key to different files.
This commit is contained in:
parent
b8a91ebf46
commit
e184a11f94
4 changed files with 21 additions and 1 deletions
17
g10/misc.c
17
g10/misc.c
|
@ -822,6 +822,23 @@ pct_expando(const char *string,struct expando_args *args)
|
|||
}
|
||||
break;
|
||||
|
||||
case 'U': /* z-base-32 encoded user id hash. */
|
||||
if (args->namehash)
|
||||
{
|
||||
char *tmp = zb32_encode (args->namehash, 8*20);
|
||||
if (tmp)
|
||||
{
|
||||
if (idx + strlen (tmp) < maxlen)
|
||||
{
|
||||
strcpy (ret+idx, tmp);
|
||||
idx += strlen (tmp);
|
||||
}
|
||||
xfree (tmp);
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'c': /* signature count from card, if any. */
|
||||
if(idx+10<maxlen)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue