diff options
| author | Patrick Steinhardt <ps@pks.im> | 2019-06-14 14:22:19 +0200 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2019-06-24 18:33:22 +0200 |
| commit | fda206228f5df603a6fc3a81092e36850d4879b2 (patch) | |
| tree | ed7e46b134d5611d3441cd92acbc775908b4de4e /src/hash.h | |
| parent | bd48bf3fb9368541bafda7877cf159f94884c187 (diff) | |
| download | libgit2-fda206228f5df603a6fc3a81092e36850d4879b2.tar.gz | |
hash: move SHA1 implementations into 'sha1/' folder
As we will include additional hash algorithms in the future due
to upstream git discussing a move away from SHA1, we should
accomodate for that and prepare for the move. As a first step,
move all SHA1 implementations into a common subdirectory.
Also, create a SHA1-specific header file that lives inside the
hash folder. This header will contain the SHA1-specific header
includes, function declarations and the SHA1 context structure.
Diffstat (limited to 'src/hash.h')
| -rw-r--r-- | src/hash.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/hash.h b/src/hash.h index 1ccf66d5f..ddd0ea201 100644 --- a/src/hash.h +++ b/src/hash.h @@ -4,6 +4,7 @@ * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. */ + #ifndef INCLUDE_hash_h__ #define INCLUDE_hash_h__ @@ -18,19 +19,7 @@ typedef struct { size_t len; } git_buf_vec; -#if defined(GIT_SHA1_COLLISIONDETECT) -# include "hash/hash_collisiondetect.h" -#elif defined(GIT_SHA1_COMMON_CRYPTO) -# include "hash/hash_common_crypto.h" -#elif defined(GIT_SHA1_OPENSSL) -# include "hash/hash_openssl.h" -#elif defined(GIT_SHA1_WIN32) -# include "hash/hash_win32.h" -#elif defined(GIT_SHA1_MBEDTLS) -# include "hash/hash_mbedtls.h" -#else -# include "hash/hash_generic.h" -#endif +#include "hash/sha1.h" int git_hash_global_init(void); |
