Blender V5.3
hash_md5.cc File Reference
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <sys/types.h>
#include "BLI_hash_md5.hh"

Go to the source code of this file.

Classes

struct  blender::md5_ctx

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define UINT_MAX_32_BITS   0xFFFFFFFF
#define UINT_MAX   UINT_MAX_32_BITS
#define SWAP(n)
#define FF(b, c, d)
#define FG(b, c, d)
#define FH(b, c, d)
#define FI(b, c, d)
#define CYCLIC(w, s)
#define OP(a, b, c, d, s, T)
#define OP(f, a, b, c, d, k, s, T)
#define BLOCKSIZE   4096

Typedefs

using blender::md5_uint32 = uint

Functions

static void blender::md5_init_ctx (md5_ctx *ctx)
static void blender::md5_process_block (const void *buffer, size_t len, md5_ctx *ctx)
static void * blender::md5_read_ctx (const md5_ctx *ctx, void *resbuf)
int blender::BLI_hash_md5_stream (FILE *stream, void *resblock)
void * blender::BLI_hash_md5_buffer (const char *buffer, size_t len, void *resblock)
char * blender::BLI_hash_md5_to_hexdigest (const void *resblock, char r_hex_digest[33])

Variables

static const uchar blender::fillbuf [64] = {0x80, 0 }

Detailed Description

Functions to compute MD5 message digest of files or memory blocks according to the definition of MD5 in RFC 1321 from April 1992.

Definition in file hash_md5.cc.

Macro Definition Documentation

◆ BLOCKSIZE

#define BLOCKSIZE   4096

◆ CYCLIC

#define CYCLIC ( w,
s )
Value:
(w = (w << s) | (w >> (32 - s)))
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition btQuadWord.h:119

◆ FF

#define FF ( b,
c,
d )
Value:
(d ^ (b & (c ^ d)))

◆ FG

#define FG ( b,
c,
d )
Value:
FF(d, b, c)
#define FF(b, c, d)

Referenced by blender::md5_process_block().

◆ FH

#define FH ( b,
c,
d )
Value:
(b ^ c ^ d)

Referenced by blender::md5_process_block().

◆ FI

#define FI ( b,
c,
d )
Value:
(c ^ (b | ~d))

Referenced by blender::md5_process_block().

◆ OP [1/2]

#define OP ( a,
b,
c,
d,
s,
T )
Value:
a += FF(b, c, d) + (*cwp++ = SWAP(*words)) + T; \
words++; \
CYCLIC(a, s); \
a += b; \
(void)0
#define SWAP(type, a, b)
#define T

Referenced by blender::md5_process_block().

◆ OP [2/2]

#define OP ( f,
a,
b,
c,
d,
k,
s,
T )
Value:
a += f(b, c, d) + correct_words[k] + T; \
CYCLIC(a, s); \
a += b; \
(void)0

◆ SWAP

#define SWAP ( n)
Value:
(n)

Definition at line 76 of file hash_md5.cc.

◆ UINT_MAX

◆ UINT_MAX_32_BITS

#define UINT_MAX_32_BITS   0xFFFFFFFF

Definition at line 36 of file hash_md5.cc.