X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Cipher_code.git/blobdiff_plain/121b99635da1e62a424bea25d9d54fb0845cba43..eff7c8ed3a5515ef551c85075c5532c6f6f5c7d4:/OneRoundIoT/OneRound/rc4_hash3.cpp?ds=inline diff --git a/OneRoundIoT/OneRound/rc4_hash3.cpp b/OneRoundIoT/OneRound/rc4_hash3.cpp index 5c9061c..822b1aa 100644 --- a/OneRoundIoT/OneRound/rc4_hash3.cpp +++ b/OneRoundIoT/OneRound/rc4_hash3.cpp @@ -146,15 +146,7 @@ uint64_t xorshift64( const uint64_t state) x^= x << 17; return x; } -uint xorshift32(const uint t) -{ - /* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */ - uint x = t; - x ^= x << 13; - x ^= x >> 17; - x ^= x << 5; - return x; -} + static inline uint64_t splitmix64(uint64_t index) { uint64_t z = (index + UINT64_C(0x9E3779B97F4A7C15)); @@ -176,49 +168,31 @@ void hash_DSD_BIN(uchar* seq_in, uchar* RM1,int len, uchar *S, int h) { // Goal: Calculate the hash value // Output: RM (hash value) - -// uchar *X=new uchar[h2]; -// uchar *fX=new uchar[h2]; uchar X[h]; - int ind1,ind2; + //uint64_t rm2[h>>8]; + int ind1=0; - uint32_t *rm=(uint32_t*)RM1; - uint32_t *xx=(uint32_t*)X; - uint32_t *ss=(uint32_t*)seq_in; + uint64_t *rm=(uint64_t*)RM1; + // uint64_t *xx=(uint64_t*)X; + uint64_t *ss=(uint64_t*)seq_in; + int a=0; for(int it=0;it>3); }