mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
sm: Print algorithm infos in data decryption mode.
* common/sexputil.c (cipher_mode_to_string): New. * sm/decrypt.c (prepare_decryption): Show cipher algo and mode. (gpgsm_decrypt): Show key algo and fingerprint Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
34b628db46
commit
439c9b5cb5
3 changed files with 30 additions and 0 deletions
|
@ -698,3 +698,19 @@ hash_algo_to_string (int algo)
|
|||
return hashnames[i].name;
|
||||
return "?";
|
||||
}
|
||||
|
||||
|
||||
/* Map cipher modes to a string. */
|
||||
const char *
|
||||
cipher_mode_to_string (int mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case GCRY_CIPHER_MODE_CFB: return "CFB";
|
||||
case GCRY_CIPHER_MODE_CBC: return "CBC";
|
||||
case GCRY_CIPHER_MODE_GCM: return "GCM";
|
||||
case GCRY_CIPHER_MODE_OCB: return "OCB";
|
||||
case 14: return "EAX"; /* Only in gcrypt 1.9 */
|
||||
default: return "[?]";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue