mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 11:55:06 -05:00
cmac+hash: change parameter types
For consistency and safety, change the CMC and HSH functions to accept signed lengths and handle negative values as errors. Also, change the input data type to void * to not require casting in the caller.
This commit is contained in:
6
hash.h
6
hash.h
@@ -48,10 +48,8 @@ typedef enum {
|
||||
|
||||
extern int HSH_GetHashId(HSH_Algorithm algorithm);
|
||||
|
||||
extern unsigned int HSH_Hash(int id,
|
||||
const unsigned char *in1, unsigned int in1_len,
|
||||
const unsigned char *in2, unsigned int in2_len,
|
||||
unsigned char *out, unsigned int out_len);
|
||||
extern int HSH_Hash(int id, const void *in1, int in1_len, const void *in2, int in2_len,
|
||||
unsigned char *out, int out_len);
|
||||
|
||||
extern void HSH_Finalise(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user