check return code on RAND_bytes();