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 {
47 GUInt32 hash[CPL_SHA256_HASH_WORDS];
54 typedef struct _CPL_SHA256Context CPL_SHA256Context;
56 void CPL_DLL CPL_SHA256Init(CPL_SHA256Context * sc);
58 void CPL_DLL CPL_SHA256Update(CPL_SHA256Context * sc,
const void *data,
size_t len);
60 void CPL_DLL CPL_SHA256Final(CPL_SHA256Context * sc,
GByte hash[CPL_SHA256_HASH_SIZE]);
62 void CPL_DLL CPL_SHA256(
const void *data,
size_t len,
GByte hash[CPL_SHA256_HASH_SIZE]);
64 void CPL_DLL CPL_HMAC_SHA256(
const void *pKey,
size_t nKeyLen,
65 const void *pabyMessage,
size_t nMessageLen,
66 GByte abyDigest[CPL_SHA256_HASH_SIZE]);
69 GByte* CPL_RSA_SHA256_Sign(
const char* pszPrivateKey,
71 unsigned int nDataLen,
72 unsigned int* pnSignatureLen);
Core portability definitions for CPL.
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:337
unsigned int GUInt32
Unsigned int32 type.
Definition: cpl_port.h:207
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:215
GUIntBig GUInt64
Unsigned 64 bit integer type.
Definition: cpl_port.h:269
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:339