HOPS
HOPS class reference
Classes | Macros
picohash.h File Reference
#include <assert.h>
#include <inttypes.h>
#include <string.h>
#include <endian.h>

Go to the source code of this file.

Classes

struct  _picohash_md5_ctx_t
 

Macros

#define _PICOHASH_BIG_ENDIAN
 
#define _PICOHASH_MD5_F(x, y, z)   ((z) ^ ((x) & ((y) ^ (z))))
 
#define _PICOHASH_MD5_G(x, y, z)   ((y) ^ ((z) & ((x) ^ (y))))
 
#define _PICOHASH_MD5_GET(n)   (ctx->block[(n)])
 
#define _PICOHASH_MD5_H(x, y, z)   ((x) ^ (y) ^ (z))
 
#define _PICOHASH_MD5_I(x, y, z)   ((y) ^ ((x) | ~(z)))
 
#define _PICOHASH_MD5_SET(n)
 
#define _PICOHASH_MD5_STEP(f, a, b, c, d, x, t, s)
 
#define PICOHASH_MD5_BLOCK_LENGTH   64
 
#define PICOHASH_MD5_DIGEST_LENGTH   16
 

Class Documentation

◆ _picohash_md5_ctx_t

struct _picohash_md5_ctx_t
Class Members
uint_fast32_t a
uint_fast32_t b
uint_fast32_t block[PICOHASH_MD5_DIGEST_LENGTH]
unsigned char buffer[64]
uint_fast32_t c
uint_fast32_t d
uint_fast32_t hi
uint_fast32_t lo

Macro Definition Documentation

◆ _PICOHASH_BIG_ENDIAN

#define _PICOHASH_BIG_ENDIAN

J. Barrett: cloned from https://github.com/kazuho/picohash.git at commit ID: 57fe0cb4c32527c71dab5973539673dcba0280c5 on Mar 12, 2021 Mar 16, 2021 : modified to strip out everything but md5 and fix char* <-> void* casts

◆ _PICOHASH_MD5_F

#define _PICOHASH_MD5_F (   x,
  y,
 
)    ((z) ^ ((x) & ((y) ^ (z))))

◆ _PICOHASH_MD5_G

#define _PICOHASH_MD5_G (   x,
  y,
 
)    ((y) ^ ((z) & ((x) ^ (y))))

◆ _PICOHASH_MD5_GET

#define _PICOHASH_MD5_GET (   n)    (ctx->block[(n)])

◆ _PICOHASH_MD5_H

#define _PICOHASH_MD5_H (   x,
  y,
 
)    ((x) ^ (y) ^ (z))

◆ _PICOHASH_MD5_I

#define _PICOHASH_MD5_I (   x,
  y,
 
)    ((y) ^ ((x) | ~(z)))

◆ _PICOHASH_MD5_SET

#define _PICOHASH_MD5_SET (   n)
Value:
(ctx->block[(n)] = (uint_fast32_t)ptr[(n)*4] | ((uint_fast32_t)ptr[(n)*4 + 1] << 8) | ((uint_fast32_t)ptr[(n)*4 + 2] << 16) | \
((uint_fast32_t)ptr[(n)*4 + 3] << 24))

◆ _PICOHASH_MD5_STEP

#define _PICOHASH_MD5_STEP (   f,
  a,
  b,
  c,
  d,
  x,
  t,
 
)
Value:
(a) += f((b), (c), (d)) + (x) + (t); \
(a) = (((a) << (s)) | (((a)&0xffffffff) >> (32 - (s)))); \
(a) += (b);
t
Definition: picking_aedit.py:14

◆ PICOHASH_MD5_BLOCK_LENGTH

#define PICOHASH_MD5_BLOCK_LENGTH   64

◆ PICOHASH_MD5_DIGEST_LENGTH

#define PICOHASH_MD5_DIGEST_LENGTH   16