File nut/include/contrib/crypto/hashfunction_descriptor.h


Included Files


Preprocessor definitions

#define HASHFUNCTION_DESCRIPTOR_H_

#define VOID_FPT

#define HFDESC_TYPE_HASHFUNCTION 0x02


Typedef void_fpt

typedef void (*void_fpt)(void)

Typedef hf_init_fpt

typedef void (*hf_init_fpt)(void*)

Typedef hf_nextBlock_fpt

typedef void (*hf_nextBlock_fpt)(void*,const void*)

Typedef hf_lastBlock_fpt

typedef void (*hf_lastBlock_fpt)(void*,const void*,uint16_t)

Typedef hf_ctx2hash_fpt

typedef void (*hf_ctx2hash_fpt)(void*,void*)

Typedef hf_free_fpt

typedef void (*hf_free_fpt)(void*)

Typedef hf_mem_fpt

typedef void (*hf_mem_fpt)(void*,const void*,uint32_t)

Typedef hfdesc_t

typedef struct {...} hfdesc_t
struct  
   {  
      uint8_t type; typefield, always 2 for hash functions
      uint8_t flags; flags, currently unused should be set to zero
      const char* name; name, flash pointer to the name string
      uint16_t ctxsize_B; ctxsize_B, size of the hash context in bytes
      uint16_t blocksize_b; blocksize_b, size of an input block in bits
      uint16_t hashsize_b; hashsize_b, size of the output hash value in bits
      hf_init_fpt init; init, function pointer to the algorithms init function
      hf_nextBlock_fpt nextBlock; nextBlock, function pointer to the algorithms nextBlock function
      hf_lastBlock_fpt lastBlock; lastBlock, function pointer to the algorithms lastBlock function
      hf_ctx2hash_fpt ctx2hash; ctx2hash, function pointer to the algorithms ctx2hash function
      hf_free_fpt free; free, function pointer to the algorithms free function or NULL if * there is no such function
      hf_mem_fpt mem; mem, function pointer to a function which hashes a message in RAM * completely or NULL if there is no such function
   }  

Typedef hfgen_ctx_t

typedef struct {...} hfgen_ctx_t
struct  
   {  
      hfdesc_t* desc_ptr;  
      void* ctx;  
   }