My Project
|
Functions | |
int | wc_InitSipHash (SipHash *siphash, const unsigned char *key, unsigned char outSz) |
This function initializes SipHash with a key for a MAC size. More... | |
int | wc_SipHashUpdate (SipHash *siphash, const unsigned char *in, word32 inSz) |
Can be called to continually hash the provided byte array of length len. More... | |
int | wc_SipHashFinal (SipHash *siphash, unsigned char *out, unsigned char outSz) |
Finalizes MACing of data. Result is placed into out. More... | |
int | wc_SipHash (const unsigned char *key, const unsigned char *in, word32 inSz, unsigned char *out, unsigned char outSz) |
This function one-shots the data using SipHash to calculate a MAC based on the key. More... | |
int wc_InitSipHash | ( | SipHash * | siphash, |
const unsigned char * | key, | ||
unsigned char | outSz | ||
) |
This function initializes SipHash with a key for a MAC size.
siphash | pointer to the SipHash structure to use for MACing |
key | pointer to the 16-byte array |
outSz | number of bytes to output as MAC |
Example
int wc_SipHash | ( | const unsigned char * | key, |
const unsigned char * | in, | ||
word32 | inSz, | ||
unsigned char * | out, | ||
unsigned char | outSz | ||
) |
This function one-shots the data using SipHash to calculate a MAC based on the key.
key | pointer to the 16-byte array |
in | the data to be MACed |
inSz | size of data to be MACed |
out | Byte array to hold MAC value |
outSz | number of bytes to output as MAC |
Example
int wc_SipHashFinal | ( | SipHash * | siphash, |
unsigned char * | out, | ||
unsigned char | outSz | ||
) |
Finalizes MACing of data. Result is placed into out.
siphash | pointer to the SipHash structure to use for MACing |
out | Byte array to hold MAC value |
outSz | number of bytes to output as MAC |
Example
int wc_SipHashUpdate | ( | SipHash * | siphash, |
const unsigned char * | in, | ||
word32 | inSz | ||
) |
Can be called to continually hash the provided byte array of length len.
siphash | pointer to the SipHash structure to use for MACing |
in | the data to be MACed |
inSz | size of data to be MACed |
Example