GDAL

cpl_sha1.h
1/******************************************************************************
2 *
3 * Project: CPL - Common Portability Library
4 * Purpose: Implement SHA1
5 * Author: Even Rouault, even.rouault at spatialys.com
6 *
7 * SHA1 computation coming from Public Domain code at:
8 * https://github.com/B-Con/crypto-algorithms/blob/master/sha1.c
9 * by Brad Conte (brad AT bradconte.com)
10 *
11 ******************************************************************************
12 * Copyright (c) 2017, Even Rouault <even.rouault at spatialys.com>
13 *
14 * SPDX-License-Identifier: MIT
15 ****************************************************************************/
16
17#ifndef CPL_SHA1_INCLUDED_H
18#define CPL_SHA1_INCLUDED_H
19
20#ifndef DOXYGEN_SKIP
21
22#include "cpl_port.h"
23
24#define CPL_SHA1_HASH_SIZE 20 // SHA1 outputs a 20 byte digest
25
26 CPL_C_START
27
28/* Not CPL_DLL exported */
29 void CPL_HMAC_SHA1(const void *pKey, size_t nKeyLen, const void *pabyMessage,
30 size_t nMessageLen, GByte abyDigest[CPL_SHA1_HASH_SIZE]);
31
32 CPL_C_END
33
34#endif /* #ifndef DOXYGEN_SKIP */
35
36#endif /* CPL_SHA1_INCLUDED_H */
cpl_port.h
Core portability definitions for CPL.
CPL_C_END
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:283
CPL_C_START
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:279
GByte
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:169