added libtomcrypt-1.05
This commit is contained in:
committed by
Steffen Jaeckel
parent
9da48eb84b
commit
9264e34ffb
@@ -25,14 +25,17 @@ int unregister_prng(const struct ltc_prng_descriptor *prng)
|
||||
int x;
|
||||
|
||||
LTC_ARGCHK(prng != NULL);
|
||||
|
||||
|
||||
/* is it already registered? */
|
||||
LTC_MUTEX_LOCK(<c_prng_mutex);
|
||||
for (x = 0; x < TAB_SIZE; x++) {
|
||||
if (memcmp(&prng_descriptor[x], prng, sizeof(struct ltc_prng_descriptor)) != 0) {
|
||||
prng_descriptor[x].name = NULL;
|
||||
LTC_MUTEX_UNLOCK(<c_prng_mutex);
|
||||
return CRYPT_OK;
|
||||
}
|
||||
}
|
||||
LTC_MUTEX_UNLOCK(<c_prng_mutex);
|
||||
return CRYPT_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user