diff options
Diffstat (limited to 'node/SHA512.cpp')
-rw-r--r-- | node/SHA512.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/node/SHA512.cpp b/node/SHA512.cpp index 589913d7..d3c938af 100644 --- a/node/SHA512.cpp +++ b/node/SHA512.cpp @@ -357,4 +357,11 @@ void SHA512::hash(void *digest,const void *data,unsigned int len) } // namespace ZeroTier -#endif +#endif // !ZT_HAVE_NATIVE_SHA512 + +// Internally re-export to included C code, which includes some fast crypto code ported in on some platforms. +// This eliminates the need to link against a third party SHA512() from this code +extern "C" void ZT_sha512internal(void *digest,const void *data,unsigned int len) +{ + ZeroTier::SHA512::hash(digest,data,len); +} |