wpa_supplicant / hostapd
2.5
|
SHA-256 hash implementation and interface functions. More...
#include "includes.h"
#include "common.h"
#include "sha256.h"
#include "sha256_i.h"
#include "crypto.h"
Functions | |
int | sha256_vector (size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) |
SHA256 hash for data vector. More... | |
void | sha256_init (struct sha256_state *md) |
int | sha256_process (struct sha256_state *md, const unsigned char *in, unsigned long inlen) |
int | sha256_done (struct sha256_state *md, unsigned char *out) |
SHA-256 hash implementation and interface functions.
#define RND | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i | |||
) |
#define RORc | ( | x, | |
y | |||
) |
int sha256_done | ( | struct sha256_state * | md, |
unsigned char * | out | ||
) |
Terminate the hash to get the digest
md | The hash state |
out | [out] The destination of the hash (32 bytes) |
int sha256_process | ( | struct sha256_state * | md, |
const unsigned char * | in, | ||
unsigned long | inlen | ||
) |
Process a block of memory though the hash
md | The hash state |
in | The data to hash |
inlen | The length of the data (octets) |
int sha256_vector | ( | size_t | num_elem, |
const u8 * | addr[], | ||
const size_t * | len, | ||
u8 * | mac | ||
) |
SHA256 hash for data vector.
num_elem | Number of elements in the data vector |
addr | Pointers to the data areas |
len | Lengths of the data blocks |
mac | Buffer for the hash |