summaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/hash.c b/src/hash.c
index 784b10b4b..1ddf7a3bc 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -28,7 +28,7 @@
#include "sha1.h"
struct git_hash_ctx {
- git_SHA_CTX c;
+ SHA_CTX c;
};
git_hash_ctx *git_hash_new_ctx(void)
@@ -38,7 +38,7 @@ git_hash_ctx *git_hash_new_ctx(void)
if (!ctx)
return NULL;
- git_SHA1_Init(&ctx->c);
+ SHA1_Init(&ctx->c);
return ctx;
}
@@ -51,37 +51,37 @@ void git_hash_free_ctx(git_hash_ctx *ctx)
void git_hash_init(git_hash_ctx *ctx)
{
assert(ctx);
- git_SHA1_Init(&ctx->c);
+ SHA1_Init(&ctx->c);
}
void git_hash_update(git_hash_ctx *ctx, const void *data, size_t len)
{
assert(ctx);
- git_SHA1_Update(&ctx->c, data, len);
+ SHA1_Update(&ctx->c, data, len);
}
void git_hash_final(git_oid *out, git_hash_ctx *ctx)
{
assert(ctx);
- git_SHA1_Final(out->id, &ctx->c);
+ SHA1_Final(out->id, &ctx->c);
}
void git_hash_buf(git_oid *out, const void *data, size_t len)
{
- git_SHA_CTX c;
+ SHA_CTX c;
- git_SHA1_Init(&c);
- git_SHA1_Update(&c, data, len);
- git_SHA1_Final(out->id, &c);
+ SHA1_Init(&c);
+ SHA1_Update(&c, data, len);
+ SHA1_Final(out->id, &c);
}
void git_hash_vec(git_oid *out, git_buf_vec *vec, size_t n)
{
- git_SHA_CTX c;
+ SHA_CTX c;
size_t i;
- git_SHA1_Init(&c);
+ SHA1_Init(&c);
for (i = 0; i < n; i++)
- git_SHA1_Update(&c, vec[i].data, vec[i].len);
- git_SHA1_Final(out->id, &c);
+ SHA1_Update(&c, vec[i].data, vec[i].len);
+ SHA1_Final(out->id, &c);
}