hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
generator.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_GENERATOR_HPP
7 #define IROHA_GENERATOR_HPP
8 
9 #include <algorithm>
10 
11 #include "common/blob.hpp"
12 
13 namespace generator {
14 
15  template <size_t size_>
18  srand(seed);
19  std::generate_n(v.begin(), size_, [] { return rand() % 256; });
20  return v;
21  }
22 
28  std::string randomString(size_t len);
29 
30 } // namespace generator
31 
32 #endif // IROHA_GENERATOR_HPP
std::string randomString(size_t len)
Definition: generator.cpp:10
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
Definition: blob.hpp:49
iroha::blob_t< size_ > random_blob(size_t seed)
Definition: generator.hpp:16
Definition: generator.cpp:8