From ad9c75f234c6ce61f3134ea2234e54d46df9df52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 10 Jun 2017 15:01:58 +0200 Subject: [PATCH] core: remove unused functions secure_search_hash_algo and secure_search_cipher (issue #1012) --- src/core/wee-secure.c | 50 ------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/src/core/wee-secure.c b/src/core/wee-secure.c index 647cb2e90..51b1de262 100644 --- a/src/core/wee-secure.c +++ b/src/core/wee-secure.c @@ -79,56 +79,6 @@ struct t_gui_buffer *secure_buffer = NULL; int secure_buffer_display_values = 0; -/* - * Searches for a hash algorithm. - * - * Returns hash algorithm value (from gcrypt constant), -1 if hash algorithm is - * not found. - */ - -int -secure_search_hash_algo (const char *hash_algo) -{ - int i; - - if (!hash_algo) - return -1; - - for (i = 0; secure_hash_algo_string[i]; i++) - { - if (strcmp (secure_hash_algo_string[i], hash_algo) == 0) - return secure_hash_algo[i]; - } - - /* hash algorithm not found */ - return -1; -} - -/* - * Searches for a cipher. - * - * Returns cipher value (from gcrypt constant), -1 if cipher is not - * found. - */ - -int -secure_search_cipher (const char *cipher) -{ - int i; - - if (!cipher) - return -1; - - for (i = 0; secure_cipher_string[i]; i++) - { - if (strcmp (secure_cipher_string[i], cipher) == 0) - return secure_cipher[i]; - } - - /* cipher not found */ - return -1; -} - /* * Derives a key from salt + passphrase (using a hash). *