void silc_client_free(SilcClient client)
{
if (client) {
+ if (client->rng)
+ silc_rng_free(client->rng);
+
silc_free(client);
}
}
/* Initialize random number generator */
client->rng = silc_rng_alloc();
silc_rng_init(client->rng);
- silc_math_primegen_init(); /* XXX */
+ silc_rng_global_init(client->rng);
/* Register protocols */
silc_client_protocols_register();
}
/* Samve as above but does not allocate any memory. The encoded data is
- returned into `dst' and it's length to the `ret_len'. If `dst_len is
- non-zero then the destination buffer is assumbed to be that large. */
+ returned into `dst' and it's length to the `ret_len'. */
void silc_mp_mp2bin_noalloc(SilcInt *val, unsigned char *dst,
unsigned int dst_len)