Changeset 133 for trunk/include


Ignore:
Timestamp:
Oct 25, 2007, 12:19:05 AM (17 years ago)
Author:
rainer
Message:

Reentrant checksum/hash functions.

Location:
trunk/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/samhain.h

    r132 r133  
    6262#define KEY_LEN   48
    6363#define KEY_BLOCK 24
     64#define KEYBUF_SIZE (KEY_LEN+1)
    6465
    6566/* The length of the compiled-in password.
  • trunk/include/sh_pthread.h

    r132 r133  
    2626#define SH_MUTEX_UNLOCK_UNSAFE(M) pthread_mutex_unlock(&(M))
    2727
     28/*
     29 * ----   Global mutexes   ----
     30 */
     31SH_MUTEX_EXTERN(mutex_skey);
     32
    2833#else
    2934
  • trunk/include/sh_srp.h

    r1 r133  
    2121void sh_srp_x (char * salt, char * password);
    2222int  sh_srp_make_a (void);
    23 char * sh_srp_M (char * x1, char * x2, char * x3);
     23char * sh_srp_M (char * x1, char * x2, char * x3, char * buf, size_t size);
    2424
    2525char * sh_srp_verifier (void);
  • trunk/include/sh_tiger.h

    r107 r133  
    77#include "samhain.h"
    88
     9typedef long int TigerType;
     10
     11#define TIGER_FILE -1;
     12#define TIGER_DATA -2;
     13
     14/****************
    915typedef enum {
    1016  TIGER_FILE,
     
    1218  TIGER_DATA
    1319} TigerType;
     20*****************/
    1421
    1522#define TIGER_NOLIM ((UINT64)-1)
    16 
    17 extern SL_TICKET tiger_fd;
    1823
    1924/* the checksum function
    2025 */
    2126/*@owned@*/ char * sh_tiger_hash (const char * filename, TigerType what,
    22                                   UINT64 Length);
     27                                  UINT64 Length, char * out, size_t len);
    2328
    2429/* NEW Thu Oct 18 19:59:08 CEST 2001
     
    2631int sh_tiger_hashtype (const char * c);
    2732char * sh_tiger_generic_hash (char * filename, TigerType what,
    28                               UINT64 Length, int timeout);
     33                              UINT64 Length, int timeout,
     34                              char * out, size_t len);
    2935
    3036UINT32 * sh_tiger_hash_uint32 (char * filename,
    3137                               TigerType what,
    32                                UINT64 Length);
     38                               UINT64 Length, UINT32 * out, size_t len);
    3339
    3440/* get the type of hash function used
     
    3743int sh_tiger_get_hashtype ();
    3844
    39 /* GnuPG-like format
     45/* GnuPG-like format, returns allocated memory
    4046 */
    4147/*@owned@*/ char * sh_tiger_hash_gpg (const char * filename, TigerType what,
Note: See TracChangeset for help on using the changeset viewer.