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

  • 6c14f48
  • /
  • 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:7c8b07626b42f653bc96721bef234505fac39c8b
directory badge Iframe embedding
swh:1:dir:0608d317a7e8a1ccc89c4221ded83bf43da8de3d
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