sha1: added prefix crypto_ to SHA1 API

sha1.c contains symbols that overlap with libcrypto. This patch
fixes linking with libstrophe as static library.

Prefix crypto_ will help to group other crypto API in the future.
This commit is contained in:
Dmitry Podgorny
2015-10-09 11:29:52 +03:00
parent 3b55c20879
commit f326c2f42f
5 changed files with 56 additions and 51 deletions

View File

@@ -5,8 +5,8 @@
* SHA-1 hash API.
*/
#ifndef __SHA1_H
#define __SHA1_H
#ifndef __LIBSTROPHE_SHA1_H__
#define __LIBSTROPHE_SHA1_H__
#ifdef __cplusplus
extern "C" {
@@ -23,13 +23,14 @@ typedef struct {
#define SHA1_DIGEST_SIZE 20
void SHA1_Init(SHA1_CTX* context);
void SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len);
void SHA1_Final(SHA1_CTX* context, uint8_t* digest);
void SHA1(const uint8_t* data, size_t len, uint8_t* digest);
void crypto_SHA1_Init(SHA1_CTX* context);
void crypto_SHA1_Update(SHA1_CTX* context, const uint8_t* data,
const size_t len);
void crypto_SHA1_Final(SHA1_CTX* context, uint8_t* digest);
void crypto_SHA1(const uint8_t* data, size_t len, uint8_t* digest);
#ifdef __cplusplus
}
#endif
#endif /* __SHA1_H */
#endif /* __LIBSTROPHE_SHA1_H__ */