random.c File Reference

#include "MagickCore/studio.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/image-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/semaphore.h"
#include "MagickCore/random_.h"
#include "MagickCore/random-private.h"
#include "MagickCore/resource_.h"
#include "MagickCore/signature-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/thread_.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"

Data Structures

struct  _RandomInfo

Defines

#define PseudoRandomHash   SHA256Hash
#define RandomEntropyLevel   9
#define RandomFilename   "reservoir.xdm"
#define RandomFiletype   "random"
#define RandomProtocolMajorVersion   1
#define RandomProtocolMinorVersion   0
#define MaxEntropyExtent   64

Functions

static StringInfoGenerateEntropicChaos (RandomInfo *)
MagickExport RandomInfoAcquireRandomInfo (void)
MagickExport RandomInfoDestroyRandomInfo (RandomInfo *random_info)
static ssize_t ReadRandom (int file, unsigned char *source, size_t length)
MagickExport double GetPseudoRandomValue (RandomInfo *random_info)
MagickPrivate double GetRandomInfoNormalize (const RandomInfo *random_info)
MagickPrivate unsigned long * GetRandomInfoSeed (RandomInfo *random_info)
MagickExport StringInfoGetRandomKey (RandomInfo *random_info, const size_t length)
MagickExport unsigned long GetRandomSecretKey (const RandomInfo *random_info)
MagickExport double GetRandomValue (RandomInfo *random_info)
MagickPrivate MagickBooleanType RandomComponentGenesis (void)
MagickPrivate void RandomComponentTerminus (void)
static void IncrementRandomNonce (StringInfo *nonce)
MagickExport void SetRandomKey (RandomInfo *random_info, const size_t length, unsigned char *key)
MagickExport void SetRandomSecretKey (const unsigned long key)
MagickExport void SetRandomTrueRandom (const MagickBooleanType true_random)

Variables

char ** environ
static SemaphoreInforandom_semaphore = (SemaphoreInfo *) NULL
static unsigned long secret_key = ~0UL
static MagickBooleanType gather_true_random = MagickFalse

Define Documentation

#define MaxEntropyExtent   64

Referenced by GenerateEntropicChaos().

#define PseudoRandomHash   SHA256Hash
#define RandomEntropyLevel   9
#define RandomFilename   "reservoir.xdm"
#define RandomFiletype   "random"
#define RandomProtocolMajorVersion   1

Referenced by AcquireRandomInfo().

#define RandomProtocolMinorVersion   0

Referenced by AcquireRandomInfo().


Function Documentation

MagickExport RandomInfo* AcquireRandomInfo ( void   ) 
MagickExport RandomInfo* DestroyRandomInfo ( RandomInfo random_info  ) 
static StringInfo * GenerateEntropicChaos ( RandomInfo random_info  )  [static]
MagickExport double GetPseudoRandomValue ( RandomInfo random_info  ) 
MagickPrivate double GetRandomInfoNormalize ( const RandomInfo random_info  ) 
MagickPrivate unsigned long* GetRandomInfoSeed ( RandomInfo random_info  ) 

References _RandomInfo::seed.

MagickExport StringInfo* GetRandomKey ( RandomInfo random_info,
const size_t  length 
)
MagickExport unsigned long GetRandomSecretKey ( const RandomInfo random_info  ) 
MagickExport double GetRandomValue ( RandomInfo random_info  ) 

References SetRandomKey().

static void IncrementRandomNonce ( StringInfo nonce  )  [inline, static]
MagickPrivate MagickBooleanType RandomComponentGenesis ( void   ) 
MagickPrivate void RandomComponentTerminus ( void   ) 
static ssize_t ReadRandom ( int  file,
unsigned char *  source,
size_t  length 
) [static]

Referenced by GenerateEntropicChaos().

MagickExport void SetRandomKey ( RandomInfo random_info,
const size_t  length,
unsigned char *  key 
)
MagickExport void SetRandomSecretKey ( const unsigned long  key  ) 

References secret_key.

MagickExport void SetRandomTrueRandom ( const MagickBooleanType  true_random  ) 

References gather_true_random.


Variable Documentation

char** environ

Referenced by GenerateEntropicChaos().

MagickBooleanType gather_true_random = MagickFalse [static]
unsigned long secret_key = ~0UL [static]

Generated on 26 Aug 2019 for MagickCore by  doxygen 1.6.1