Fix C linkage for C++

This commit is contained in:
Rudi Cilibrasi 2016-10-23 12:31:01 -07:00
parent b9604edf5b
commit ff116e799e
1 changed files with 12 additions and 0 deletions

View File

@ -23,11 +23,23 @@
#include <pthread.h>
#include <assert.h>
#ifdef __cplusplus
extern "C" {
#endif
void Blake2PrepareMidstate4(void *midstate, uchar *input);
#ifdef __cplusplus
}
#endif
//midstate: 256 bytes of buffer for output midstate, aligned by 32
//input: 140 bytes header, preferably aligned by 8
#ifdef __cplusplus
extern "C" {
#endif
void Blake2Run4(uchar *hashout, void *midstate, u32 indexctr);
#ifdef __cplusplus
}
#endif
//hashout: hash output buffer: 4*64 bytes
//midstate: 256 bytes from Blake2PrepareMidstate4
//indexctr: For n=200, k=9: {0, 4, 8, ..., 1048572}