1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
12 @file crypt_find_cipher.c
13 Find a cipher in the descriptor tables, Tom St Denis
17 Find a registered cipher by name
18 @param name The name of the cipher to look for
19 @return >= 0 if found, -1 if not present
21 int find_cipher(const char *name)
24 LTC_ARGCHK(name != NULL);
25 LTC_MUTEX_LOCK(<c_cipher_mutex);
26 for (x = 0; x < TAB_SIZE; x++) {
27 if (cipher_descriptor[x].name != NULL && !XSTRCMP(cipher_descriptor[x].name, name)) {
28 LTC_MUTEX_UNLOCK(<c_cipher_mutex);
32 LTC_MUTEX_UNLOCK(<c_cipher_mutex);
37 /* ref: $Format:%D$ */
38 /* git commit: $Format:%H$ */
39 /* commit time: $Format:%ai$ */