diff --git a/include/sha512.h b/include/sha512.h index 68b636d..0e5507f 100644 --- a/include/sha512.h +++ b/include/sha512.h @@ -27,12 +27,12 @@ typedef struct sha512_functions_ { } sha512_functions; extern sha512_functions _ed_sha512_functions; -void _ed_sha512_validate() { +inline void _ed_sha512_validate() { assert(_ed_sha512_functions._ed_sha512_init); assert(_ed_sha512_functions._ed_sha512_final); assert(_ed_sha512_functions._ed_sha512_update); } -int _ed_sha512(const unsigned char *message, size_t message_len, unsigned char *out) { +inline int _ed_sha512(const unsigned char *message, size_t message_len, unsigned char *out) { _ed_sha512_validate(); int result = 1; diff --git a/src/sha512.c b/src/sha512.c index bdcb972..36ef024 100644 --- a/src/sha512.c +++ b/src/sha512.c @@ -270,7 +270,7 @@ int _ed_sha512(const unsigned char *message, size_t message_len, unsigned char * return 0; } -extern sha512_functions _ed_sha512_functions = { +sha512_functions _ed_sha512_functions = { _ed_sha512_init, _ed_sha512_final, _ed_sha512_update diff --git a/src/sha512_openssl.c b/src/sha512_openssl.c index a3a9712..5a1384b 100644 --- a/src/sha512_openssl.c +++ b/src/sha512_openssl.c @@ -14,7 +14,7 @@ int _ed_sha512_update(sha512_context * md, const unsigned char *in, size_t inlen return SHA512_Update(md, in, inlen) != 1; /* Returns 0 on success */ } -extern sha512_functions _ed_sha512_functions = { +sha512_functions _ed_sha512_functions = { _ed_sha512_init, _ed_sha512_final, _ed_sha512_update