Hash :
8832172e
Author :
Date :
2019-02-22T14:32:40
hash: move SHA1 implementations to its own hashing context 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.
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* 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_sha1_common_crypto_h__
#define INCLUDE_hash_sha1_common_crypto_h__
#include "hash/sha1.h"
#include <CommonCrypto/CommonDigest.h>
struct git_hash_sha1_ctx {
CC_SHA1_CTX c;
};
#endif