made get_random_bits to use insecure rand() instead of uninitialized memory