This commit is contained in:
1 parent
17be4841e6
commit
9881c0ac9a
6 files changed
+62
-62
No files matched your search
@@ -24,24 +24,24 @@ typedef struct WpSipHasherKey {
|
||||
u64 hi;
|
||||
} WpSipHasherKey;
|
||||
|
||||
typedef struct WpSipHasherData {
|
||||
typedef struct WpSipHasherCtx {
|
||||
WpSipHasherKey key;
|
||||
u64 magic;
|
||||
u64 compression;
|
||||
u64 finalisation;
|
||||
} WpSipHasherData;
|
||||
} WpSipHasherCtx;
|
||||
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
#define wpSip24HasherData(KEY) (WpSipHasherData{(KEY), WP_SIP_HASHER_MAGIC, 2, 4})
|
||||
#define wpSip48HasherData(KEY) (WpSipHasherData{(KEY), WP_SIP_HASHER_MAGIC, 4, 8})
|
||||
#define wpSip24HasherCtx(KEY) (WpSipHasherCtx{(KEY), WP_SIP_HASHER_MAGIC, 2, 4})
|
||||
#define wpSip48HasherCtx(KEY) (WpSipHasherCtx{(KEY), WP_SIP_HASHER_MAGIC, 4, 8})
|
||||
#else
|
||||
#define wpSip24HasherData(KEY) ((WpSipHasherData){ \
|
||||
#define wpSip24HasherCtx(KEY) ((WpSipHasherCtx){ \
|
||||
.key = (KEY), \
|
||||
.magic = WP_SIP_HASHER_MAGIC, \
|
||||
.compression = 2, \
|
||||
.finalisation = 4, \
|
||||
})
|
||||
#define wpSip48HasherData(KEY) ((WpSipHasherData){ \
|
||||
#define wpSip48HasherCtx(KEY) ((WpSipHasherCtx){ \
|
||||
.key = (KEY), \
|
||||
.magic = WP_SIP_HASHER_MAGIC, \
|
||||
.compression = 4, \
|
||||
@@ -49,7 +49,7 @@ typedef struct WpSipHasherData {
|
||||
})
|
||||
#endif
|
||||
|
||||
WpHasher wpSipHasher(WpSipHasherData *data);
|
||||
WpHasher wpSipHasher(WpSipHasherCtx *ctx);
|
||||
WpU128Hash wpSipHasher128(WpU8Stream *bytes, void *hasher_io);
|
||||
|
||||
#ifdef WP_PLATFORM_CPP
|
||||
|
||||
Reference in new issue
Block a user