# LLO - Low Level Obfuscation Utils This repo contains a list of utils that will probably need to be implimented for LLO. * llo::utils::generate_random_number, generate a random numerical value. ```cpp template concept is_arithmetic_t = std::is_arithmetic_v; template number_t generate_random_number(const number_t minimum, const number_t maximum) { using uniform_distribution_t = std::conditional_t, std::uniform_int_distribution, std::uniform_real_distribution>; std::random_device random_device; auto mt = std::mt19937{ random_device() }; auto uniform_distribution = uniform_distribution_t{ minimum, maximum }; return uniform_distribution(mt); } ``` * llo::utils::hash_t templated class that contains unique std::uint64_t hash value for any given data. use std::hash to compute the hash. https://en.cppreference.com/w/cpp/utility/hash. use std::hash to hash type T and a random uint64_t.. ```cpp template class T hash_t { hash_t hash(const T& data, std::size_t hash_result) : data {&data}, hash_result{hash_result} {} std::size_t hash_result; const T* data; public: static std::shared_ptr make(const T& data) { auto hash = std::hash>{}(data, llo::utils::generate_random_number()); return std::make_shared(data, hash); } T& get_data() const; std::size_t get_hash() const; }; ```