Main Page Modules Data Structures File List Data Fields Globals Related Pages

# beecrypt/beecrypt.h File Reference

`#include "types.h"`
`#include "memchunk.h"`
`#include "mp32number.h"`

Go to the source code of this file.

## Data Structures
struct | blockCipher
struct | blockCipherContext
struct | blockMode
struct | entropySource
struct | hashFunction
struct | hashFunctionContext
struct | keyedHashFunction
struct | keyedHashFunctionContext
struct | randomGenerator
struct | randomGeneratorContext
## Entropy sources
typedef int(* | entropyNext )(uint32 *data, int size)
int | entropySourceCount (void)
const entropySource * | entropySourceGet (int index)
const entropySource * | entropySourceFind (const char *name)
const entropySource * | entropySourceDefault (void)
int | entropyGatherNext (uint32 *data, int size)
## Pseudo-random Number Generators
typedef void | randomGeneratorParam
typedef int(* | randomGeneratorSetup )(randomGeneratorParam *param)
typedef int(* | randomGeneratorSeed )(randomGeneratorParam *param, const uint32 *data, int size)
typedef int(* | randomGeneratorNext )(randomGeneratorParam *param, uint32 *data, int size)
typedef int(* | randomGeneratorCleanup )(randomGeneratorParam *param)
int | randomGeneratorCount (void)
const randomGenerator * | randomGeneratorGet (int index)
const randomGenerator * | randomGeneratorFind (const char *name)
const randomGenerator * | randomGeneratorDefault (void)
int | randomGeneratorContextInit (randomGeneratorContext *ctxt, const randomGenerator *rng)
int | randomGeneratorContextFree (randomGeneratorContext *ctxt)
int | randomGeneratorContextNext (randomGeneratorContext *ctxt, uint32 *data, int size)
## Hash Functions
typedef void | hashFunctionParam
typedef int(* | hashFunctionReset )(hashFunctionParam *param)
typedef int(* | hashFunctionUpdate )(hashFunctionParam *param, const byte *data, int size)
typedef int(* | hashFunctionDigest )(hashFunctionParam *param, uint32 *data)
int | hashFunctionCount (void)
const hashFunction * | hashFunctionGet (int index)
const hashFunction * | hashFunctionFind (const char *name)
const hashFunction * | hashFunctionDefault (void)
int | hashFunctionContextInit (hashFunctionContext *ctxt, const hashFunction *hash)
int | hashFunctionContextFree (hashFunctionContext *ctxt)
int | hashFunctionContextReset (hashFunctionContext *ctxt)
int | hashFunctionContextUpdate (hashFunctionContext *ctxt, const byte *data, int size)
int | hashFunctionContextUpdateMC (hashFunctionContext *ctxt, const memchunk *m)
int | hashFunctionContextUpdateMP32 (hashFunctionContext *ctxt, const mp32number *n)
int | hashFunctionContextDigest (hashFunctionContext *ctxt, mp32number *dig)
int | hashFunctionContextDigestMatch (hashFunctionContext *ctxt, const mp32number *match)
## Keyed Hash Functions, a.k.a. Message Authentication Codes
typedef void | keyedHashFunctionParam
typedef int(* | keyedHashFunctionSetup )(keyedHashFunctionParam *param, const uint32 *key, int keybits)
typedef int(* | keyedHashFunctionReset )(keyedHashFunctionParam *param)
typedef int(* | keyedHashFunctionUpdate )(keyedHashFunctionParam *param, const byte *data, int size)
typedef int(* | keyedHashFunctionDigest )(keyedHashFunctionParam *param, uint32 *data)
int | keyedHashFunctionCount (void)
const keyedHashFunction * | keyedHashFunctionGet (int index)
const keyedHashFunction * | keyedHashFunctionFind (const char *name)
const keyedHashFunction * | keyedHashFunctionDefault (void)
int | keyedHashFunctionContextInit (keyedHashFunctionContext *ctxt, const keyedHashFunction *mac)
int | keyedHashFunctionContextFree (keyedHashFunctionContext *ctxt)
int | keyedHashFunctionContextSetup (keyedHashFunctionContext *ctxt, const uint32 *key, int keybits)
int | keyedHashFunctionContextReset (keyedHashFunctionContext *ctxt)
int | keyedHashFunctionContextUpdate (keyedHashFunctionContext *ctxt, const byte *data, int size)
int | keyedHashFunctionContextUpdateMC (keyedHashFunctionContext *ctxt, const memchunk *m)
int | keyedHashFunctionContextUpdateMP32 (keyedHashFunctionContext *ctxt, const mp32number *n)
int | keyedHashFunctionContextDigest (keyedHashFunctionContext *ctxt, mp32number *dig)
int | keyedHashFunctionContextDigestMatch (keyedHashFunctionContext *ctxt, const mp32number *match)
## Block ciphers
typedef void | blockCipherParam
typedef int(* | blockModeEncrypt )(blockCipherParam *param, int count, uint32 *dst, const uint32 *src)
typedef int(* | blockModeDecrypt )(blockCipherParam *param, int count, uint32 *dst, const uint32 *src)
typedef int(* | blockCipherSetup )(blockCipherParam *param, const uint32 *key, int keybits, cipherOperation cipherOperation)
typedef int(* | blockCipherSetIV )(blockCipherParam *param, const uint32 *data)
typedef int(* | blockCipherEncrypt )(blockCipherParam *param, uint32 *dst, const uint32 *src)
typedef int(* | blockCipherDecrypt )(blockCipherParam *param, uint32 *dst, const uint32 *src)
enum | cipherOperation { ENCRYPT, DECRYPT }
enum | cipherMode { ECB, CBC }
int | blockCipherCount (void)
const blockCipher * | blockCipherGet (int index)
const blockCipher * | blockCipherFind (const char *name)
const blockCipher * | blockCipherDefault (void)
int | blockCipherContextInit (blockCipherContext *ctxt, const blockCipher *ciph)
int | blockCipherContextSetup (blockCipherContext *ctxt, const uint32 *key, int keybits, cipherOperation op)
int | blockCipherContextSetIV (blockCipherContext *ctxt, const uint32 *iv)
int | blockCipherContextFree (blockCipherContext *ctxt)