38 #ifndef __MOCANA_HEADER__ 39 #define __MOCANA_HEADER__ 45 #ifdef MOC_EXTERN_MOCANA_H 46 #undef MOC_EXTERN_MOCANA_H 51 #ifdef WIN_EXPORT_INITIALIZE 52 #define MOC_EXTERN_MOCANA_H __declspec(dllexport) 54 #define MOC_EXTERN_MOCANA_H __declspec(dllimport) extern 58 #undef MOC_EXTERN_MOCANA_H 59 #define MOC_EXTERN_MOCANA_H extern 64 #define MOC_EXTERN_MOCANA_H extern 72 #define MOC_EXTERN_P MOC_EXTERN_MOCANA_H 149 typedef sbyte4 (*ShutdownHandler)(void);
157 MOC_EXTERN_P
volatile sbyte4 gMocanaAppsRunning;
160 MOC_EXTERN_MOCANA_H ShutdownHandler g_sslShutdownHandler;
167 #ifndef __DISABLE_MOCANA_INIT__ 352 #ifndef __DISABLE_MOCANA_ADD_ENTROPY__ 415 #ifndef __DISABLE_MOCANA_FILE_SYSTEM_HELPER__ 607 const char *pFilename,
const char *pExt,
intBoolean *pFileExist);
618 MOC_EXTERN
sbyte4 MOCANA_opendir(
void **pDirInfo,
const char *pPath);
627 MOC_EXTERN
sbyte4 MOCANA_readdir(
void *pDir,
void **pFileInfo);
636 MOC_EXTERN
sbyte4 MOCANA_closedir(
void *pDir);
642 #ifndef MOC_DP_MAPPING_RELEASE 643 #define MOC_DP_MAPPING_RELEASE TRUE 646 #if ( (defined(__ENABLE_MOCANA_FP_MAPPING_READ__)) && \ 647 (!defined(__ENABLE_MOCANA_FP_MAPPING_GUARD__)) ) 649 #include "../data_protection/file_protect.h" 651 #define MOCANA_readFile(_file, _retBuf, _retLen) \ 652 MOCANA_readFileEx(_file, _retBuf, _retLen, MOC_DP_MAPPING_RELEASE) 656 #if ( (defined(__ENABLE_MOCANA_FP_MAPPING_WRITE__)) && \ 657 (!defined(__ENABLE_MOCANA_FP_MAPPING_GUARD__)) ) 659 #include "../data_protection/file_protect.h" 661 #ifndef __DISABLE_MOCANA_FP_IMMUTABLE_WRITE_BUFFER__ 663 #define MOCANA_writeFile(_file, _buf, _bufLen) \ 664 MOCANA_writeFileEx(_file, _buf, _bufLen, MOC_DP_MAPPING_RELEASE) 668 #define MOCANA_writeFile(_file, _buf, _bufLen) \ 669 MOCANA_writeFileEx(_file, (ubyte *)_buf, _bufLen, MOC_DP_MAPPING_RELEASE) MOC_EXTERN sbyte4 MOCANA_writeFile(const char *pFilename, const ubyte *pBuffer, ubyte4 bufLength)
Write a buffer's contents to a file.
signed char sbyte
Default signed 1-byte type.
Definition: mtypes.h:35
MOC_EXTERN sbyte4 MOCANA_initMocanaStaticMemory(ubyte *pStaticMem, ubyte4 staticMemSize)
This is the same as initMocana, except it will set up static memory.
MOC_EXTERN sbyte4 MOCANA_copyFile(const char *pSrcFilename, const char *pDestFilename)
Copy a file.
signed int sbyte4
Default signed 4-byte type.
Definition: mtypes.h:43
MOC_EXTERN sbyte4 MOCANA_freeReadFile(ubyte **ppRetBuffer)
Release memory allocated by MOCANA_readFile().
MOC_EXTERN sbyte4 MOCANA_readFile(const char *pFilename, ubyte **ppRetBuffer, ubyte4 *pRetBufLength)
Allocate a buffer and fill with data read from a file.
MOC_EXTERN sbyte4 MOCANA_deleteFile(const char *pFilename)
Delete a file from the filesystem.
MOC_EXTERN sbyte4 MOCANA_checkFile(const char *pFilename, const char *pExt, intBoolean *pFileExist)
Check if a file exists on the filesystem.
MOC_EXTERN sbyte4 MOCANA_freeMocana(void)
Release memory allocated by MOCANA_initMocana.
unsigned int ubyte4
Default unsigned 4-byte type.
Definition: mtypes.h:31
void(* logFn)(sbyte4 module, sbyte4 severity, sbyte *msg)
Callback for logging function.
Definition: mocana.h:147
MOC_EXTERN sbyte4 MOCANA_addEntropyBit(ubyte entropyBit)
Add a random bit to application's random number generator.
MOC_EXTERN sbyte4 MOCANA_appendFile(const char *pFilename, const ubyte *pBuffer, ubyte4 bufLength)
Appends a buffer's contents to a file, file is created if it does not exist.
sbyte4 intBoolean
Integer boolean type.
Definition: mtypes.h:156
MOC_EXTERN sbyte4 MOCANA_initMocana(void)
Initialize Digicert common code base.
MOC_EXTERN sbyte4 MOCANA_addEntropy32Bits(ubyte4 entropyBits)
Add 32 random bits to application's random number generator.
unsigned char ubyte
Default unsigned 1-byte type.
Definition: mtypes.h:23
MOC_EXTERN sbyte4 MOCANA_initLog(logFn lFn)
Register a callback function for the Digicert logging system.