#ifndef ALCRYPTOLIB_STREAM_HASH_HASH_JENKINS_2020_01_23_H #define ALCRYPTOLIB_STREAM_HASH_HASH_JENKINS_2020_01_23_H #include #include #if(__cplusplus >= 201703L) namespace al::crypto::stream::hash { #else namespace al { namespace crypto { namespace stream { namespace hash { #endif class hash_jenkins : public al::crypto::stream::stream { private: using base_class_type = al::crypto::stream::stream; public: // TBD constructors, destructor, assignment operator. // TBD: Initialize and finalize are implemented. But they both probably do nothing. private: std::uint32_t my_hash; }; #if(__cplusplus >= 201703L) } // namespace al::crypto::stream::hash #else } // namespace hash } // namespace stream } // namespace crypto } // namespace al #endif /* uint32_t jenkins_one_at_a_time_hash(char *key, size_t len) { uint32_t hash, i; for(hash = i = 0; i < len; ++i) { hash += key[i]; hash += (hash << 10); hash ^= (hash >> 6); } hash += (hash << 3); hash ^= (hash >> 11); hash += (hash << 15); return hash; } */ #endif // ALCRYPTOLIB_STREAM_HASH_HASH_JENKINS_2020_01_23_H