/* Copyright (c) 2014-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "randgen.h"
#ifdef HAVE_ARC4RANDOM
#ifdef HAVE_LIBBSD
#endif
{
return arc4random();
}
{
return arc4random_uniform(upper_bound);
}
#else
{
return value;
}
{
/* FIXME: This simple implementation suffers from modulo-bias. */
return i_rand() % upper_bound;
}
#endif