/usr/include/bglibs/crypto/hmac.h is in libbg1-dev 1.106-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #ifndef CRYPTO__HMAC__H__
#define CRYPTO__HMAC__H__
typedef void (*hmac_init_fn)(void*);
typedef void (*hmac_update_fn)(void*, const unsigned char*, unsigned long);
typedef void (*hmac_finalize_fn)(void*, unsigned char*);
typedef void (*hmac_extract_fn)(const void*, void*);
typedef void (*hmac_inject_fn)(void*, const void*);
struct hmac_control_block
{
unsigned state_size;
unsigned block_size;
unsigned digest_size;
unsigned midstate_size;
hmac_init_fn init;
hmac_update_fn update;
hmac_finalize_fn finalize;
hmac_extract_fn extract;
hmac_inject_fn inject;
};
extern const struct hmac_control_block hmac_md5;
extern const struct hmac_control_block hmac_sha1;
extern const struct hmac_control_block hmac_sha256;
extern const struct hmac_control_block hmac_sha384;
extern const struct hmac_control_block hmac_sha512;
struct str;
extern void hmac_prepare(const struct hmac_control_block* hcb,
void* midstate,
const struct str* secret);
extern void hmac_finish(const struct hmac_control_block* hcb,
const void* midstate,
const struct str* nonce,
void* outout);
extern void hmac(const struct hmac_control_block* hcb,
const struct str* secret,
const struct str* nonce,
void* output);
#endif
|