Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cryptohash.h File Reference

Go to the source code of this file.


#define SHA_DIGEST_WORDS   5
#define SHA_MESSAGE_BYTES   (512 /*bits*/ / 8)
#define MD5_DIGEST_WORDS   4
#define MD5_MESSAGE_BYTES   64


void sha_init (__u32 *buf)
void sha_transform (__u32 *digest, const char *data, __u32 *W)
void md5_transform (__u32 *hash, __u32 const *in)
__u32 half_md4_transform (__u32 buf[4], __u32 const in[8])

Macro Definition Documentation

#define MD5_DIGEST_WORDS   4

Definition at line 11 of file cryptohash.h.

#define MD5_MESSAGE_BYTES   64

Definition at line 12 of file cryptohash.h.

#define SHA_DIGEST_WORDS   5

Definition at line 4 of file cryptohash.h.

#define SHA_MESSAGE_BYTES   (512 /*bits*/ / 8)

Definition at line 5 of file cryptohash.h.


Definition at line 6 of file cryptohash.h.

Function Documentation

__u32 half_md4_transform ( __u32  buf[4],
__u32 const  in[8] 

Definition at line 25 of file halfmd4.c.

void md5_transform ( __u32 hash,
__u32 const in 

Definition at line 13 of file md5.c.

void sha_init ( __u32 buf)

sha_init - initialize the vectors for a SHA1 digest : vector to initialize

Definition at line 193 of file sha1.c.

void sha_transform ( __u32 digest,
const char data,
__u32 array 

sha_transform - single block SHA1 transform

: 160 bit digest to update : 512 bits of data to hash : 16 words of workspace (see note)

This function generates a SHA1 digest for a single 512-bit block. Be warned, it does not handle padding and message digest, do not confuse it with the full FIPS 180-1 digest algorithm for variable length messages.

Note: If the hash is security sensitive, the caller should be sure to clear the workspace. This is left to the caller to avoid unnecessary clears between chained hashing operations.

Definition at line 81 of file sha1.c.