15 #include "absl/random/internal/salted_seed_seq.h"
22 #include "gmock/gmock.h"
23 #include "gtest/gtest.h"
33 template <
typename Sseq>
34 void ConformsToInterface() {
36 { Sseq default_constructed_seq; }
39 uint32_t init_array[] = {1, 3, 5, 7, 9};
43 { Sseq list_constructed_seq = {1, 3, 5, 7, 9, 11, 13}; }
46 uint32_t init_array[] = {1, 2, 3, 4, 5};
50 std::vector<uint32_t> state_vector;
51 seq.param(std::back_inserter(state_vector));
54 for (
int i = 0;
i < state_vector.size();
i++) {
69 ConformsToInterface<std::seed_seq>();
72 ConformsToInterface<SaltedSeedSeq<std::seed_seq>>();
76 std::vector<uint32_t> seed_values(10, 1);
77 std::seed_seq seq(seed_values.begin(), seed_values.end());
82 std::vector<uint32_t> param_result;
83 seq.param(std::back_inserter(param_result));
109 const size_t kNumBlocks = 16;
112 std::random_device urandom{
"/dev/urandom"};
124 if (salt_is_available) {
126 uint32_t salted_outputs[kNumBlocks];
136 const size_t kNumBlocks = 4;
145 unsigned long seed_material[kNumBlocks];
150 unsigned int seed_material[kNumBlocks];
162 int64_t seed_material[kNumBlocks];