Added required dll export for the SHA512 function table

This commit is contained in:
WolverinDEV 2019-04-10 22:21:45 +02:00
parent b4426e07fa
commit ad72bc7f72
3 changed files with 11 additions and 0 deletions

View File

@ -12,6 +12,10 @@ typedef struct sha512_functions_ {
int(*_ed_sha512_final)(sha512_context*, unsigned char *); int(*_ed_sha512_final)(sha512_context*, unsigned char *);
int(*_ed_sha512_update)(sha512_context*, const unsigned char *, size_t); int(*_ed_sha512_update)(sha512_context*, const unsigned char *, size_t);
} sha512_functions; } sha512_functions;
#ifdef WIN32
__declspec(dllexport)
#endif
extern sha512_functions _ed_sha512_functions; extern sha512_functions _ed_sha512_functions;
inline void _ed_sha512_validate() { inline void _ed_sha512_validate() {

View File

@ -283,6 +283,9 @@ int __ed_sha512_update(sha512_context *md, const unsigned char *in, size_t inlen
return _ed_sha512_update(md->context, in, inlen); return _ed_sha512_update(md->context, in, inlen);
} }
#ifdef WIN32
__declspec(dllexport)
#endif
sha512_functions _ed_sha512_functions = { sha512_functions _ed_sha512_functions = {
__ed_sha512_init, __ed_sha512_init,
__ed_sha512_final, __ed_sha512_final,

View File

@ -23,6 +23,10 @@ int _ed_sha512_update(sha512_context* md, const unsigned char *in, size_t inlen)
return SHA512_Update(md->context, in, inlen) != 1; /* Returns 0 on success */ return SHA512_Update(md->context, in, inlen) != 1; /* Returns 0 on success */
} }
#ifdef WIN32
__declspec(dllexport)
#endif
sha512_functions _ed_sha512_functions = { sha512_functions _ed_sha512_functions = {
_ed_sha512_init, _ed_sha512_init,
_ed_sha512_final, _ed_sha512_final,