Use secure random data sources instead of rand()