save the internal state of RandomNumberGenerator