summaryrefslogtreecommitdiff
path: root/src/hash/sha1
Commit message (Collapse)AuthorAgeFilesLines
* Fix coding style for pointerpunkymaniac2021-09-091-8/+8
| | | | Make some syntax change to follow coding style.
* sha1dc: remove conditional for <sys/types.h>Peter Pettersson2021-08-181-2/+0
|
* Initial pass at using int64_t instead of long longCalvin Buckley2021-07-061-1/+1
| | | | | | | | | Even on systems without C99 where long long and stdint are both missing, we can shim stdint and point it to any compiler-specific type (i.e long long, _int64, etc.). Also next is constant suffixes and determining what needs to include stdint.
* hash: use GIT_ASSERTEdward Thomson2020-11-275-30/+33
|
* runtime: move init/shutdown into the "runtime"Edward Thomson2020-10-111-2/+3
| | | | | Provide a mechanism for system components to register for initialization and shutdown of the libgit2 runtime.
* sha1: win32: fix compilation due to unknown typePatrick Steinhardt2019-07-181-1/+1
| | | | | | | | | | In commit bbf034ab9 (hash: move `git_hash_prov` into Win32 backend, 2019-02-22), the `git_hash_prov`'s structure name has been removed in favour of its typedef'ed name. But as we have no CI that compiles with the WinHTTPS hashing backend right now, it wasn't noticed that the implementation that uses this struct wasn't changed correctly. Fix the struct type to make it compile again.
* hash: move SHA1 implementations to its own hashing contextPatrick Steinhardt2019-06-2412-62/+58
| | | | | | | | | Create a separate `git_hash_sha1_ctx` structure that is specific to the SHA1 implementation and move all SHA1 functions over to use that one instead of the generic `git_hash_ctx`. The `git_hash_ctx` for now simply has a union containing this single SHA1 implementation, only, without any mechanism to distinguish between different algortihms.
* hash: split into generic and SHA1-specific interfacePatrick Steinhardt2019-06-246-43/+43
| | | | | | | | | | | As a preparatory step to allow multiple hashing APIs to exist at the same time, split the hashing functions into one layer for generic hashing and one layer for SHA1-specific hashing. Right now, this is simply an additional indirection layer that doesn't yet serve any purpose. In the future, the generic API will be extended to allow for choosing which hash to use, though, by simply passing an enum to the hash context initialization function. This is necessary as a first step to be ready for Git's move to SHA256.
* hash: move SHA1 implementations into 'sha1/' folderPatrick Steinhardt2019-06-2416-0/+3511
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.