Changeset 5284:3fcf039ca02c in roaraudio for include
- Timestamp:
- 11/22/11 12:53:18 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/hash.h
r4878 r5284 39 39 #include "libroar.h" 40 40 41 typedef uint_least32_t roar_hash_t; 42 41 43 // the hashtypes: 42 #define ROAR_HT_NONE 043 #define ROAR_HT_MD5 144 #define ROAR_HT_SHA1 245 #define ROAR_HT_RIPEMD160 346 #define ROAR_HT_MD2 547 #define ROAR_HT_TIGER 648 #define ROAR_HT_HAVAL 749 #define ROAR_HT_SHA256 850 #define ROAR_HT_SHA384 951 #define ROAR_HT_SHA512 1052 #define ROAR_HT_SHA224 1153 #define ROAR_HT_MD4 30154 #define ROAR_HT_CRC32 30255 #define ROAR_HT_RFC1510 30356 #define ROAR_HT_RFC2440 30457 #define ROAR_HT_WHIRLPOOL 30558 #define ROAR_HT_UUID 7000059 #define ROAR_HT_GTN8 7000160 #define ROAR_HT_GTN16 7000261 #define ROAR_HT_GTN32 7000462 #define ROAR_HT_GTN64 7000863 #define ROAR_HT_CLIENTID 7100164 #define ROAR_HT_STREAMID 7100265 #define ROAR_HT_SOURCEID 7100366 #define ROAR_HT_SAMPLEID 7100467 #define ROAR_HT_MIXERID 7100568 #define ROAR_HT_BRIDGEID 7100669 #define ROAR_HT_LISTENID 7100770 #define ROAR_HT_ACTIONID 7100871 #define ROAR_HT_MSGQUEUEID 7100972 #define ROAR_HT_MSGBUSID 7101073 #define ROAR_HT_GTIN8 7200174 #define ROAR_HT_GTIN13 7200275 #define ROAR_HT_ISBN10 7200344 #define ROAR_HT_NONE ((roar_hash_t)0UL) 45 #define ROAR_HT_MD5 ((roar_hash_t)1UL) 46 #define ROAR_HT_SHA1 ((roar_hash_t)2UL) 47 #define ROAR_HT_RIPEMD160 ((roar_hash_t)3UL) 48 #define ROAR_HT_MD2 ((roar_hash_t)5UL) 49 #define ROAR_HT_TIGER ((roar_hash_t)6UL) 50 #define ROAR_HT_HAVAL ((roar_hash_t)7UL) 51 #define ROAR_HT_SHA256 ((roar_hash_t)8UL) 52 #define ROAR_HT_SHA384 ((roar_hash_t)9UL) 53 #define ROAR_HT_SHA512 ((roar_hash_t)10UL) 54 #define ROAR_HT_SHA224 ((roar_hash_t)11UL) 55 #define ROAR_HT_MD4 ((roar_hash_t)301UL) 56 #define ROAR_HT_CRC32 ((roar_hash_t)302UL) 57 #define ROAR_HT_RFC1510 ((roar_hash_t)303UL) 58 #define ROAR_HT_RFC2440 ((roar_hash_t)304UL) 59 #define ROAR_HT_WHIRLPOOL ((roar_hash_t)305UL) 60 #define ROAR_HT_UUID ((roar_hash_t)70000UL) 61 #define ROAR_HT_GTN8 ((roar_hash_t)70001UL) 62 #define ROAR_HT_GTN16 ((roar_hash_t)70002UL) 63 #define ROAR_HT_GTN32 ((roar_hash_t)70004UL) 64 #define ROAR_HT_GTN64 ((roar_hash_t)70008UL) 65 #define ROAR_HT_CLIENTID ((roar_hash_t)71001UL) 66 #define ROAR_HT_STREAMID ((roar_hash_t)71002UL) 67 #define ROAR_HT_SOURCEID ((roar_hash_t)71003UL) 68 #define ROAR_HT_SAMPLEID ((roar_hash_t)71004UL) 69 #define ROAR_HT_MIXERID ((roar_hash_t)71005UL) 70 #define ROAR_HT_BRIDGEID ((roar_hash_t)71006UL) 71 #define ROAR_HT_LISTENID ((roar_hash_t)71007UL) 72 #define ROAR_HT_ACTIONID ((roar_hash_t)71008UL) 73 #define ROAR_HT_MSGQUEUEID ((roar_hash_t)71009UL) 74 #define ROAR_HT_MSGBUSID ((roar_hash_t)71010UL) 75 #define ROAR_HT_GTIN8 ((roar_hash_t)72001UL) 76 #define ROAR_HT_GTIN13 ((roar_hash_t)72002UL) 77 #define ROAR_HT_ISBN10 ((roar_hash_t)72003UL) 76 78 #define ROAR_HT_ISBN13 ROAR_HT_GTIN13 77 #define ROAR_HT_ADLER32 7300179 #define ROAR_HT_ADLER32 ((roar_hash_t)73001UL) 78 80 79 81 struct roar_hash_cmds { 80 int algo;82 roar_hash_t algo; 81 83 ssize_t statelen; 82 84 ssize_t blocksize; … … 88 90 }; 89 91 90 const char * roar_ht2str (const intht);91 int roar_str2ht (const char* ht);92 const char * roar_ht2str (const roar_hash_t ht); 93 roar_hash_t roar_str2ht (const char * ht); 92 94 93 ssize_t roar_ht_digestlen (const intht);95 ssize_t roar_ht_digestlen (const roar_hash_t ht); 94 96 95 ssize_t roar_hash_digest2str(char * out, size_t outlen, void * digest, size_t digestlen, int ht);97 ssize_t roar_hash_digest2str(char * out, size_t outlen, void * digest, size_t digestlen, roar_hash_t ht); 96 98 97 int roar_ht_is_supported(const intht);99 int roar_ht_is_supported(const roar_hash_t ht); 98 100 99 101 struct roar_hash_state; 100 102 101 struct roar_hash_state * roar_hash_new( int algo);103 struct roar_hash_state * roar_hash_new(roar_hash_t algo); 102 104 int roar_hash_free(struct roar_hash_state * state); 103 105 int roar_hash_digest(struct roar_hash_state * state, void * digest, size_t * len); 104 106 int roar_hash_proc(struct roar_hash_state * state, const void * data, size_t len); 105 107 106 int roar_hash_buffer(void * digest, const void * data, size_t datalen, int algo);107 int roar_hash_salted_buffer(void * digest, const void * data, size_t datalen, int algo, const void * salt, size_t saltlen);108 int roar_hash_buffer(void * digest, const void * data, size_t datalen, roar_hash_t algo); 109 int roar_hash_salted_buffer(void * digest, const void * data, size_t datalen, roar_hash_t algo, const void * salt, size_t saltlen); 108 110 109 111 #endif
Note: See TracChangeset
for help on using the changeset viewer.