Blame src/hash.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_hash_h__
Packit Service 20376f
#define INCLUDE_hash_h__
Packit Service 20376f
Packit Service 20376f
#include "git2/oid.h"
Packit Service 20376f
Packit Service 20376f
typedef struct git_hash_prov git_hash_prov;
Packit Service 20376f
typedef struct git_hash_ctx git_hash_ctx;
Packit Service 20376f
Packit Service 20376f
int git_hash_global_init(void);
Packit Service 20376f
int git_hash_ctx_init(git_hash_ctx *ctx);
Packit Service 20376f
void git_hash_ctx_cleanup(git_hash_ctx *ctx);
Packit Service 20376f
Packit Service 20376f
#if defined(GIT_SHA1_COLLISIONDETECT)
Packit Service 20376f
# include "hash/hash_collisiondetect.h"
Packit Service 20376f
#elif defined(GIT_SHA1_COMMON_CRYPTO)
Packit Service 20376f
# include "hash/hash_common_crypto.h"
Packit Service 20376f
#elif defined(GIT_SHA1_OPENSSL)
Packit Service 20376f
# include "hash/hash_openssl.h"
Packit Service 20376f
#elif defined(GIT_SHA1_WIN32)
Packit Service 20376f
# include "hash/hash_win32.h"
Packit Service 20376f
#else
Packit Service 20376f
# include "hash/hash_generic.h"
Packit Service 20376f
#endif
Packit Service 20376f
Packit Service 20376f
typedef struct {
Packit Service 20376f
	void *data;
Packit Service 20376f
	size_t len;
Packit Service 20376f
} git_buf_vec;
Packit Service 20376f
Packit Service 20376f
int git_hash_init(git_hash_ctx *c);
Packit Service 20376f
int git_hash_update(git_hash_ctx *c, const void *data, size_t len);
Packit Service 20376f
int git_hash_final(git_oid *out, git_hash_ctx *c);
Packit Service 20376f
Packit Service 20376f
int git_hash_buf(git_oid *out, const void *data, size_t len);
Packit Service 20376f
int git_hash_vec(git_oid *out, git_buf_vec *vec, size_t n);
Packit Service 20376f
Packit Service 20376f
#endif /* INCLUDE_hash_h__ */