29 #ifndef CPL_SHA256_INCLUDED_H
30 #define CPL_SHA256_INCLUDED_H
36 #define CPL_SHA256_HASH_SIZE 32
37 #define CPL_SHA256_HASH_WORDS 8
40 #define GUInt64 GUIntBig
45 struct _CPL_SHA256Context
48 GUInt32 hash[CPL_SHA256_HASH_WORDS];
57 typedef struct _CPL_SHA256Context CPL_SHA256Context;
59 void CPL_DLL CPL_SHA256Init(CPL_SHA256Context *sc);
61 void CPL_DLL CPL_SHA256Update(CPL_SHA256Context *sc,
const void *data,
64 void CPL_DLL CPL_SHA256Final(CPL_SHA256Context *sc,
65 GByte hash[CPL_SHA256_HASH_SIZE]);
67 void CPL_DLL CPL_SHA256(
const void *data,
size_t len,
68 GByte hash[CPL_SHA256_HASH_SIZE]);
70 void CPL_DLL CPL_HMAC_SHA256(
const void *pKey,
size_t nKeyLen,
71 const void *pabyMessage,
size_t nMessageLen,
72 GByte abyDigest[CPL_SHA256_HASH_SIZE]);
75 GByte *CPL_RSA_SHA256_Sign(
const char *pszPrivateKey,
const void *pabyData,
76 unsigned int nDataLen,
unsigned int *pnSignatureLen);
Core portability definitions for CPL.
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:299
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:295
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:177
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition: cpl_port.h:238
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:185