|
| #define | CLOSE_SOCKET(socket) |
| |
| #define | HANDLER_RETURN_TYPE void * |
| |
| #define | HANDLER_RETURN_VALUE (void *) NULL |
| |
| #define | SOCKET_TYPE int |
| |
| #define | LENGTH_TYPE size_t |
| |
| #define | send(file, buffer, length, flags) 0 |
| |
| #define | recv(file, buffer, length, flags) 0 |
| |
| #define | DPCHostname "127.0.0.1" |
| |
| #define | DPCMacLength 32 |
| |
| #define | DPCPendingConnections 10 |
| |
| #define | DPCPort 6668 |
| |
| #define | DPCScratchExtent 16384 /* bytes; send-side encryption buffer */ |
| |
| #define | DPCSessionKeyLength 16 |
| |
| #define | MSG_NOSIGNAL 0 |
| |
| #define | magick_fallthrough /* nothing */ |
| |
| #define | EP0(x) (ROTRIGHT(x,2) ^ ROTRIGHT(x,13) ^ ROTRIGHT(x,22)) |
| |
| #define | EP1(x) (ROTRIGHT(x,6) ^ ROTRIGHT(x,11) ^ ROTRIGHT(x,25)) |
| |
| #define | CH(x, y, z) (((x) & (y)) ^ (~(x) & (z))) |
| |
| #define | MAJ(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) |
| |
| #define | ROTRIGHT(a, b) (((a) >> (b)) | ((a) << (32-(b)))) |
| |
| #define | SIG0(x) (ROTRIGHT(x,7) ^ ROTRIGHT(x,18) ^ ((x) >> 3)) |
| |
| #define | SIG1(x) (ROTRIGHT(x,17) ^ ROTRIGHT(x,19) ^ ((x) >> 10)) |
| |
|
| static int | ComputeHMACSHA256Mac (const void *, size_t, const void *, size_t, unsigned char *, size_t) |
| |
| static MagickOffsetType | dpc_receive (SOCKET_TYPE magick_unused(file), const MagickSizeType magick_unused(length), unsigned char *magick_restrict magick_unused(message)) |
| |
| static MagickOffsetType | dpc_receive_deadline (SOCKET_TYPE magick_unused(file), const MagickSizeType magick_unused(length), unsigned char *magick_restrict magick_unused(message), double magick_unused(deadline)) |
| |
| static uint64_t | ROTL (uint64_t x, int b) |
| |
| static uint64_t | U8TO64_LE (const uint8_t *p) |
| |
| static uint64_t | SIPHash24 (const uint8_t key[16], const uint8_t *message, const size_t length) |
| |
| static void | DeriveSipKeyFromSecret (const char *shared_secret, uint8_t key[16]) |
| |
| static uint64_t | GenerateSessionKey (const char *shared_secret, const unsigned char *nonce, size_t length) |
| |
| static void | InitializeSHA256Hash (SHA256Hash *sha256_hash) |
| |
| static void | TransformSHA256Hash (SHA256Hash *sha256_hash, const unsigned char data[]) |
| |
| static void | UpdateSHA256Hash (SHA256Hash *sha256_hash, const unsigned char *data, const size_t data_length) |
| |
| static void | FinalizeSHA256Hash (SHA256Hash *sha256_hash, unsigned char hash[32]) |
| |
| static void | ComputeSHA256Hash (const unsigned char *data, size_t length, unsigned char hash[32]) |
| |
| static int | ConnectPixelCacheServer (const char *hostname, const int port, uint64_t *session_key, ExceptionInfo *exception) |
| |
| static char * | GetHostname (int *port, ExceptionInfo *exception) |
| |
| MagickPrivate DistributeCacheInfo * | AcquireDistributeCacheInfo (ExceptionInfo *exception) |
| |
| MagickPrivate DistributeCacheInfo * | DestroyDistributeCacheInfo (DistributeCacheInfo *server_info) |
| |
| static MagickOffsetType | dpc_send (int magick_unused(file), const MagickSizeType magick_unused(length), const void *magick_restrict magick_unused(message)) |
| |
| static MagickOffsetType | dpc_send_mac (SOCKET_TYPE magick_unused(file), const MagickSizeType magick_unused(length), const void *magick_restrict magick_unused(message), uint64_t magick_unused(session_key)) |
| |
| static MagickOffsetType | dpc_receive_mac (SOCKET_TYPE magick_unused(file), const MagickSizeType magick_unused(length), unsigned char *magick_restrict magick_unused(message), uint64_t magick_unused(session_key)) |
| |
| MagickExport void | DistributePixelCacheServer (const int magick_unused(port), ExceptionInfo *magick_unused(exception)) |
| |
| MagickPrivate int | GetDistributeCacheFile (const DistributeCacheInfo *server_info) |
| |
| MagickPrivate const char * | GetDistributeCacheHostname (const DistributeCacheInfo *server_info) |
| |
| MagickPrivate int | GetDistributeCachePort (const DistributeCacheInfo *server_info) |
| |
| MagickPrivate MagickBooleanType | OpenDistributePixelCache (DistributeCacheInfo *server_info, Image *image) |
| |
| MagickPrivate MagickOffsetType | ReadDistributePixelCacheIndexes (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *indexes) |
| |
| MagickPrivate MagickOffsetType | ReadDistributePixelCachePixels (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, unsigned char *magick_restrict pixels) |
| |
| MagickPrivate MagickBooleanType | RelinquishDistributePixelCache (DistributeCacheInfo *server_info) |
| |
| MagickPrivate MagickOffsetType | WriteDistributePixelCacheIndexes (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, const unsigned char *indexes) |
| |
| MagickPrivate MagickOffsetType | WriteDistributePixelCachePixels (DistributeCacheInfo *server_info, const RectangleInfo *region, const MagickSizeType length, const unsigned char *magick_restrict pixels) |
| |