Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
hashes.c File Reference
#include <linux/kernel.h>
#include "reiserfs.h"
#include <asm/types.h>

Go to the source code of this file.

Macros

#define DELTA   0x9E3779B9
 
#define FULLROUNDS   10 /* 32 is overkill, 16 is strong crypto */
 
#define PARTROUNDS   6 /* 6 gets complete mixing */
 
#define TEACORE(rounds)
 

Functions

u32 keyed_hash (const signed char *msg, int len)
 
u32 yura_hash (const signed char *msg, int len)
 
u32 r5_hash (const signed char *msg, int len)
 

Macro Definition Documentation

#define DELTA   0x9E3779B9

Definition at line 25 of file hashes.c.

#define FULLROUNDS   10 /* 32 is overkill, 16 is strong crypto */

Definition at line 26 of file hashes.c.

#define PARTROUNDS   6 /* 6 gets complete mixing */

Definition at line 27 of file hashes.c.

#define TEACORE (   rounds)
Value:
do { \
u32 sum = 0; \
int n = rounds; \
u32 b0, b1; \
\
b0 = h0; \
b1 = h1; \
\
do \
{ \
sum += DELTA; \
b0 += ((b1 << 4)+a) ^ (b1+sum) ^ ((b1 >> 5)+b); \
b1 += ((b0 << 4)+c) ^ (b0+sum) ^ ((b0 >> 5)+d); \
} while(--n); \
\
h0 += b0; \
h1 += b1; \
} while(0)

Definition at line 30 of file hashes.c.

Function Documentation

u32 keyed_hash ( const signed char msg,
int  len 
)

Definition at line 50 of file hashes.c.

u32 r5_hash ( const signed char msg,
int  len 
)

Definition at line 172 of file hashes.c.

u32 yura_hash ( const signed char msg,
int  len 
)

Definition at line 133 of file hashes.c.