~ubuntu-branches/debian/lenny/linuxdcpp/lenny

« back to all changes in this revision

Viewing changes to client/TigerHash.h

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis
  • Date: 2006-12-08 15:50:58 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061208155058-tgl4tv9qhurow54z
Tags: 0.0.1.cvs20061208-1
* New upstream release
* Dropped patch for tightening linking, a solution has been implemented
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        /** Calculates the Tiger hash of the data. */
41
41
        void update(const void* data, size_t len);
42
42
        /** Call once all data has been processed. */
43
 
        u_int8_t* finalize();
 
43
        uint8_t* finalize();
44
44
 
45
 
        u_int8_t* getResult() { return (u_int8_t*) res; }
 
45
        uint8_t* getResult() { return (uint8_t*) res; }
46
46
private:
47
47
        enum { BLOCK_SIZE = 512/8 };
48
48
        /** 512 bit blocks for the compress function */
49
 
        u_int8_t tmp[512/8];
 
49
        uint8_t tmp[512/8];
50
50
        /** State / final hash value */
51
 
        u_int64_t res[3];
 
51
        uint64_t res[3];
52
52
        /** Total number of bytes compressed */
53
 
        u_int64_t pos;
 
53
        uint64_t pos;
54
54
        /** S boxes */
55
 
        static u_int64_t table[];
 
55
        static uint64_t table[];
56
56
 
57
 
        void tigerCompress(const u_int64_t* data, u_int64_t state[3]);
 
57
        void tigerCompress(const uint64_t* data, uint64_t state[3]);
58
58
};
59
59
 
60
60
#endif // !defined(TIGER_HASH_H)