check return code on RAND_bytes();
if no default provider defined, error with a message