Linux Kernel
3.7.1
|
Go to the source code of this file.
Macros | |
#define | SHA_DIGEST_WORDS 5 |
#define | SHA_MESSAGE_BYTES (512 /*bits*/ / 8) |
#define | SHA_WORKSPACE_WORDS 16 |
#define | MD5_DIGEST_WORDS 4 |
#define | MD5_MESSAGE_BYTES 64 |
Functions | |
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]) |
#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.
#define SHA_WORKSPACE_WORDS 16 |
Definition at line 6 of file cryptohash.h.
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.