This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include "tools.h"
|
||||
#include <core/rand.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -43,9 +44,7 @@ void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool
|
||||
|
||||
for (i=0; i<howMany; i++) {
|
||||
|
||||
if(!RAND_bytes(rand_buf,4)) {
|
||||
RAND_pseudo_bytes(rand_buf,4);
|
||||
}
|
||||
RandomBytes(rand_buf,4);
|
||||
|
||||
randNumber = 0;
|
||||
for(j=0; j<4; j++) {
|
||||
@@ -66,9 +65,7 @@ void Tools::getRandNumber(int start, int end, int howMany, int* randArray, bool
|
||||
int counter(0);
|
||||
while (counter < howMany) {
|
||||
|
||||
if(!RAND_bytes(rand_buf,4)) {
|
||||
RAND_pseudo_bytes(rand_buf,4);
|
||||
}
|
||||
RandomBytes(rand_buf,4);
|
||||
|
||||
randNumber = 0;
|
||||
for(j=0; j<4; j++) {
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
|
||||
class Tools{
|
||||
|
||||
Reference in New Issue
Block a user