pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Functions
md5.c File Reference
#include <config.h>
#include "md5.h"
#include <stdalign.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <byteswap.h>
Include dependency graph for md5.c:

Go to the source code of this file.

Macros

#define SWAP(n)   (n)
 
#define BLOCKSIZE   32768
 
#define UNALIGNED_P(p)   ((uintptr_t) (p) % alignof (uint32_t) != 0)
 
#define FF(b, c, d)   (d ^ (b & (c ^ d)))
 
#define FG(b, c, d)   FF (d, b, c)
 
#define FH(b, c, d)   (b ^ c ^ d)
 
#define FI(b, c, d)   (c ^ (b | ~d))
 
#define OP(a, b, c, d, s, T)
 
#define CYCLIC(w, s)   (w = (w << s) | (w >> (32 - s)))
 
#define OP(f, a, b, c, d, k, s, T)
 

Functions

void md5_init_ctx (struct md5_ctx *ctx)
 
void * md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
 
void * md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
 
void * md5_buffer (const char *buffer, size_t len, void *resblock)
 
void md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
 
void md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
 

Macro Definition Documentation

◆ BLOCKSIZE

#define BLOCKSIZE   32768

Definition at line 62 of file md5.c.

◆ CYCLIC

#define CYCLIC (   w,
 
)    (w = (w << s) | (w >> (32 - s)))

◆ FF

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

Definition at line 319 of file md5.c.

◆ FG

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

Definition at line 320 of file md5.c.

◆ FH

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

Definition at line 321 of file md5.c.

◆ FI

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

Definition at line 322 of file md5.c.

◆ OP [1/2]

#define OP (   a,
  b,
  c,
  d,
  s,
 
)
Value:
do \
{ \
a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \
++words; \
CYCLIC (a, s); \
a += b; \
} \
while (0)
#define SWAP(n)
Definition: md5.c:59
#define FF(b, c, d)
Definition: md5.c:319

◆ OP [2/2]

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

◆ SWAP

#define SWAP (   n)    (n)

Definition at line 59 of file md5.c.

◆ UNALIGNED_P

#define UNALIGNED_P (   p)    ((uintptr_t) (p) % alignof (uint32_t) != 0)

Function Documentation

◆ md5_buffer()

void* md5_buffer ( const char *  buffer,
size_t  len,
void *  resblock 
)

Definition at line 227 of file md5.c.

◆ md5_finish_ctx()

void* md5_finish_ctx ( struct md5_ctx ctx,
void *  resbuf 
)

Definition at line 113 of file md5.c.

◆ md5_init_ctx()

void md5_init_ctx ( struct md5_ctx ctx)

Definition at line 76 of file md5.c.

◆ md5_process_block()

void md5_process_block ( const void *  buffer,
size_t  len,
struct md5_ctx ctx 
)

Definition at line 328 of file md5.c.

◆ md5_process_bytes()

void md5_process_bytes ( const void *  buffer,
size_t  len,
struct md5_ctx ctx 
)

Definition at line 243 of file md5.c.

◆ md5_read_ctx()

void* md5_read_ctx ( const struct md5_ctx ctx,
void *  resbuf 
)

Definition at line 99 of file md5.c.