1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Use bin2hex if possible.

This commit is contained in:
Werner Koch 2008-11-03 10:54:18 +00:00
parent 8997c155e3
commit 338ddd0bb6
8 changed files with 34 additions and 53 deletions

View file

@ -39,7 +39,6 @@ app_help_get_keygrip_string (ksba_cert_t cert, char *hexkeygrip)
ksba_sexp_t p;
size_t n;
unsigned char array[20];
int i;
p = ksba_cert_get_public_key (cert);
if (!p)
@ -58,8 +57,7 @@ app_help_get_keygrip_string (ksba_cert_t cert, char *hexkeygrip)
}
gcry_sexp_release (s_pkey);
for (i=0; i < 20; i++)
sprintf (hexkeygrip+i*2, "%02X", array[i]);
bin2hex (array, 20, hexkeygrip);
return 0;
}