Arion 1.0.2-alpha
A high-performance C++ framework for emulating executable binaries.
 
Loading...
Searching...
No Matches
md5.hpp File Reference
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  arion::MD5_CTXT
 This structure holds the context for MD5 calculation. More...
 

Namespaces

namespace  arion
 

Macros

#define MD5_DIGEST_LEN   16
 
#define ARION_MD5_A   0x67452301
 
#define ARION_MD5_B   0xefcdab89
 
#define ARION_MD5_C   0x98badcfe
 
#define ARION_MD5_D   0x10325476
 
#define ARION_MD5_F(X, Y, Z)   ((X & Y) | (~X & Z))
 
#define ARION_MD5_G(X, Y, Z)   ((X & Z) | (Y & ~Z))
 
#define ARION_MD5_H(X, Y, Z)   (X ^ Y ^ Z)
 
#define ARION_MD5_I(X, Y, Z)   (Y ^ (X | ~Z))
 

Functions

uint32_t arion::rotate_left (uint32_t x, uint32_t n)
 
void arion::md5_init (MD5_CTXT *ctx)
 
void arion::md5_step (uint32_t *buffer, uint32_t *input)
 
void arion::md5_update (MD5_CTXT *ctx, uint8_t *input_buffer, size_t input_len)
 
void arion::md5_finalize (MD5_CTXT *ctx)
 
void arion::md5_string (char *input, uint8_t *result)
 
void arion::md5_file (FILE *file, uint8_t *result)
 

Variables

static uint32_t arion::S []
 Array of shift amounts S[i] used in the MD5 algorithm.
 
static uint32_t arion::K []
 Array of 64 pre-calculated sine constants K[i] used in the MD5 algorithm.
 
static uint8_t arion::PADDING []
 The MD5 padding constant array.
 

Macro Definition Documentation

◆ ARION_MD5_A

#define ARION_MD5_A   0x67452301

◆ ARION_MD5_B

#define ARION_MD5_B   0xefcdab89

◆ ARION_MD5_C

#define ARION_MD5_C   0x98badcfe

◆ ARION_MD5_D

#define ARION_MD5_D   0x10325476

◆ ARION_MD5_F

#define ARION_MD5_F (   X,
  Y,
 
)    ((X & Y) | (~X & Z))

◆ ARION_MD5_G

#define ARION_MD5_G (   X,
  Y,
 
)    ((X & Z) | (Y & ~Z))

◆ ARION_MD5_H

#define ARION_MD5_H (   X,
  Y,
 
)    (X ^ Y ^ Z)

◆ ARION_MD5_I

#define ARION_MD5_I (   X,
  Y,
 
)    (Y ^ (X | ~Z))

◆ MD5_DIGEST_LEN

#define MD5_DIGEST_LEN   16