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_unregister_hash.c
13 Unregister a hash, Tom St Denis
17 Unregister a hash from the descriptor table
18 @param hash The hash descriptor to remove
19 @return CRYPT_OK on success
21 int unregister_hash(const struct ltc_hash_descriptor *hash)
25 LTC_ARGCHK(hash != NULL);
27 /* is it already registered? */
28 LTC_MUTEX_LOCK(<c_hash_mutex);
29 for (x = 0; x < TAB_SIZE; x++) {
30 if (XMEMCMP(&hash_descriptor[x], hash, sizeof(struct ltc_hash_descriptor)) == 0) {
31 hash_descriptor[x].name = NULL;
32 LTC_MUTEX_UNLOCK(<c_hash_mutex);
36 LTC_MUTEX_UNLOCK(<c_hash_mutex);
40 /* ref: $Format:%D$ */
41 /* git commit: $Format:%H$ */
42 /* commit time: $Format:%ai$ */