Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • f2f3017
  • /
  • MacOS
  • /
  • Randomizer.h
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:565537b15dfb951adb0c1ad0ec45b34d83f39ab1
directory badge Iframe embedding
swh:1:dir:1fda5089999969a68b8953b40533260b8e76c590
Randomizer.h

//	Gathers unpredictable system data to be used for generating
//	random bits

#include <MacTypes.h>

class CRandomizer
{
public:
	CRandomizer (void);
	void PeriodicAction (void);
	
private:

	// Private calls

	void		AddTimeSinceMachineStartup (void);
	void		AddAbsoluteSystemStartupTime (void);
	void		AddAppRunningTime (void);
	void		AddStartupVolumeInfo (void);
	void		AddFiller (void);

	void		AddCurrentMouse (void);
	void		AddNow (double millisecondUncertainty);
	void		AddBytes (void *data, long size, double entropy);
	
	void		GetTimeBaseResolution (void);
	unsigned long	SysTimer (void);

	// System Info	
	bool		mSupportsLargeVolumes;
	bool		mIsPowerPC;
	bool		mIs601;
	
	// Time info
	double		mTimebaseTicksPerMillisec;
	unsigned long	mLastPeriodicTicks;
	
	// Mouse info
	long		mSamplePeriod;
	Point		mLastMouse;
	long		mMouseStill;
};

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top