MagickCore
6.9.10
Convert, Edit, Or Compose Bitmap Images
|
#include "magick/studio.h"
#include "magick/exception.h"
#include "magick/exception-private.h"
#include "magick/image-private.h"
#include "magick/memory_.h"
#include "magick/semaphore.h"
#include "magick/random_.h"
#include "magick/resource_.h"
#include "magick/signature-private.h"
#include "magick/string_.h"
#include "magick/thread_.h"
#include "magick/thread-private.h"
#include "magick/utility-private.h"
Data Structures | |
struct | _RandomInfo |
Macros | |
#define | PseudoRandomHash SHA256Hash |
#define | RandomEntropyLevel 9 |
#define | RandomFilename "reservoir.xdm" |
#define | RandomFiletype "random" |
#define | RandomProtocolMajorVersion 1 |
#define | RandomProtocolMinorVersion 0 |
#define | MaxEntropyExtent 64 |
Variables | |
char ** | environ |
static SemaphoreInfo * | random_semaphore = (SemaphoreInfo *) NULL |
static unsigned long | secret_key = ~0UL |
static MagickBooleanType | gather_true_random = MagickFalse |
#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().
MagickExport RandomInfo* AcquireRandomInfo | ( | void | ) |
References AcquireMagickMemory(), AcquireSignatureInfo(), AcquireStringInfo(), AllocateSemaphoreInfo(), DestroySignatureInfo(), DestroyStringInfo(), FinalizeSignature(), GenerateEntropicChaos(), GetRandomKey(), GetSignatureDigest(), GetSignatureDigestsize(), GetStringInfoDatum(), GetStringInfoLength(), InitializeSignature(), MagickCoreSignature, MagickMin, _RandomInfo::nonce, _RandomInfo::normalize, _RandomInfo::protocol_major, _RandomInfo::protocol_minor, random_info, RandomProtocolMajorVersion, RandomProtocolMinorVersion, _RandomInfo::reservoir, ResetStringInfo(), ResourceLimitFatalError, _RandomInfo::secret_key, _RandomInfo::seed, _RandomInfo::semaphore, SetStringInfo(), SetStringInfoDatum(), SetStringInfoLength(), _RandomInfo::signature, _RandomInfo::signature_info, ThrowFatalException, _RandomInfo::timestamp, and UpdateSignature().
Referenced by AcquireFxInfo(), AcquireRandomInfoThreadSet(), AcquireUniqueFileResource(), DistributePixelCacheClient(), GetVirtualPixelsFromNexus(), PlasmaImage(), RandomChannelThresholdImage(), and ShredFile().
MagickExport RandomInfo* DestroyRandomInfo | ( | RandomInfo * | random_info | ) |
References DestroySemaphoreInfo(), DestroySignatureInfo(), DestroyStringInfo(), GetMagickModule, LockSemaphoreInfo(), LogMagickEvent(), MagickCoreSignature, _RandomInfo::nonce, RelinquishMagickMemory(), _RandomInfo::reservoir, _RandomInfo::seed, _RandomInfo::semaphore, _RandomInfo::signature, _RandomInfo::signature_info, TraceEvent, and UnlockSemaphoreInfo().
Referenced by DestroyFxInfo(), DestroyPixelCache(), DestroyRandomInfoThreadSet(), DistributePixelCacheClient(), PlasmaImage(), RandomChannelThresholdImage(), ResourceComponentTerminus(), and ShredFile().
|
static |
References AcquireString(), AcquireStringInfo(), ConcatenateStringInfo(), DestroyString(), DestroyStringInfo(), environ, gather_true_random, GetMagickThreadId(), GetStringInfoDatum(), _RandomInfo::i, LockSemaphoreInfo(), MagickFalse, MaxEntropyExtent, MaxTextExtent, O_BINARY, open_utf8(), ReadRandom(), remove_utf8(), _RandomInfo::semaphore, SetStringInfoDatum(), SetStringInfoLength(), StringToStringInfo(), and UnlockSemaphoreInfo().
Referenced by AcquireRandomInfo().
MagickExport double GetPseudoRandomValue | ( | RandomInfo * | random_info | ) |
References _RandomInfo::normalize, and _RandomInfo::seed.
Referenced by FxEvaluateSubexpression(), GenerateDifferentialNoise(), PlasmaPixel(), RandomChannelThresholdImage(), RandomThresholdImageChannel(), RandomX(), RandomY(), SketchImage(), and SpreadImage().
MagickPrivate double GetRandomInfoNormalize | ( | const RandomInfo * | random_info | ) |
References _RandomInfo::normalize.
Referenced by AcquireRandomInfoThreadSet().
MagickPrivate unsigned long* GetRandomInfoSeed | ( | RandomInfo * | random_info | ) |
References _RandomInfo::seed.
Referenced by AcquireRandomInfoThreadSet().
MagickExport StringInfo* GetRandomKey | ( | RandomInfo * | random_info, |
const size_t | length | ||
) |
References AcquireStringInfo(), GetStringInfoDatum(), and SetRandomKey().
Referenced by AcquireRandomInfo(), AcquireUniqueFileResource(), DistributePixelCacheClient(), and ShredFile().
MagickExport unsigned long GetRandomSecretKey | ( | const RandomInfo * | random_info | ) |
References _RandomInfo::secret_key.
Referenced by AddNoiseImageChannel(), EvaluateImageChannel(), EvaluateImages(), RandomThresholdImageChannel(), SketchImage(), and SpreadImage().
MagickExport double GetRandomValue | ( | RandomInfo * | random_info | ) |
References SetRandomKey().
|
inlinestatic |
References GetStringInfoDatum(), GetStringInfoLength(), _RandomInfo::i, RandomFatalError, and ThrowFatalException.
Referenced by SetRandomKey().
MagickExport MagickBooleanType RandomComponentGenesis | ( | void | ) |
References AllocateSemaphoreInfo(), MagickTrue, and random_semaphore.
Referenced by MagickCoreGenesis().
MagickExport void RandomComponentTerminus | ( | void | ) |
References ActivateSemaphoreInfo(), DestroySemaphoreInfo(), and random_semaphore.
Referenced by MagickCoreTerminus().
|
static |
Referenced by GenerateEntropicChaos().
MagickExport void SeedPseudoRandomGenerator | ( | const unsigned long | seed | ) |
References SetRandomSecretKey().
MagickExport void SetRandomKey | ( | RandomInfo * | random_info, |
const size_t | length, | ||
unsigned char * | key | ||
) |
References FinalizeSignature(), GetSignatureDigest(), GetSignatureDigestsize(), GetStringInfoDatum(), _RandomInfo::i, IncrementRandomNonce(), InitializeSignature(), LockSemaphoreInfo(), _RandomInfo::nonce, _RandomInfo::reservoir, _RandomInfo::semaphore, SetStringInfo(), _RandomInfo::signature_info, UnlockSemaphoreInfo(), and UpdateSignature().
Referenced by GetRandomKey(), and GetRandomValue().
MagickExport void SetRandomSecretKey | ( | const unsigned long | key | ) |
References _RandomInfo::secret_key.
Referenced by SeedPseudoRandomGenerator().
MagickExport void SetRandomTrueRandom | ( | const MagickBooleanType | true_random | ) |
References gather_true_random.
char** environ |
Referenced by GenerateEntropicChaos().
|
static |
Referenced by GenerateEntropicChaos(), and SetRandomTrueRandom().
|
static |
Referenced by RandomComponentGenesis(), and RandomComponentTerminus().
|
static |