From 663376e385c315520e9c1f0105afb7aa1e61a58e Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 8 Aug 2019 08:42:27 -0500 Subject: [PATCH] cleanup --- node/SHA512.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/node/SHA512.cpp b/node/SHA512.cpp index 552621439..e79efc674 100644 --- a/node/SHA512.cpp +++ b/node/SHA512.cpp @@ -18,7 +18,6 @@ Public domain. #include #define ZT_HAVE_NATIVE_SHA512 namespace ZeroTier { - void SHA512(void *digest,const void *data,unsigned int len) { CC_SHA512_CTX ctx; @@ -26,7 +25,6 @@ void SHA512(void *digest,const void *data,unsigned int len) CC_SHA512_Update(&ctx,data,len); CC_SHA512_Final(reinterpret_cast(digest),&ctx); } - void SHA384(void *digest,const void *data,unsigned int len) { CC_SHA512_CTX ctx; @@ -34,7 +32,6 @@ void SHA384(void *digest,const void *data,unsigned int len) CC_SHA384_Update(&ctx,data,len); CC_SHA384_Final(reinterpret_cast(digest),&ctx); } - } #endif @@ -42,7 +39,6 @@ void SHA384(void *digest,const void *data,unsigned int len) #include #define ZT_HAVE_NATIVE_SHA512 namespace ZeroTier { - void SHA512(void *digest,const void *data,unsigned int len) { SHA512_CTX ctx; @@ -50,7 +46,6 @@ void SHA512(void *digest,const void *data,unsigned int len) SHA512_Update(&ctx,data,len); SHA512_Final(reinterpret_cast(digest),&ctx); } - void SHA384(void *digest,const void *data,unsigned int len) { SHA512_CTX ctx; @@ -58,10 +53,10 @@ void SHA384(void *digest,const void *data,unsigned int len) SHA384_Update(&ctx,data,len); SHA384_Final(reinterpret_cast(digest),&ctx); } - } #endif +// If a platform-native SHA512 isn't available we use this 64-bit C version. #ifndef ZT_HAVE_NATIVE_SHA512 namespace ZeroTier {