#ifndef DPFPP_PRG_H__ #define DPFPP_PRG_H__ namespace dpf { template inline void PRG(const lowmc & prgkey, const node_t & seed, void * outbuf, const uint32_t len, const uint32_t from = 0); // template // inline void PRG_bit_sliced(const prgkey_t & prgkey, const std::array& seed, void * outbuf, const uint32_t len); // const lowmc & prgkey, const __m128i & seed, void * outbuf, const uint32_t len, const uint32_t from // inline void PRG(const lowmc & prgkey, const node_t & seed, void * outbuf, const uint32_t len, const uint32_t from = 0) // { // using block_t = typename lowmc::block_t; // block_t * outbuf128 = reinterpret_cast(outbuf); // for (size_t i = 0; i < len; ++i) outbuf128[i] = seed ^ block_t(from+i); // prgkey.encrypt(outbuf128, len); // for (size_t i = 0; i < len; ++i) outbuf128[i] ^= (seed ^ block_t(from+i)); // } } // namespace dpf #endif // DPFPP_PRG_H