text: /**
   * Copyright Soramitsu Co., Ltd. 2017 All Rights Reserved.
   * http://soramitsu.co.jp
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *        http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  #ifndef IROHA_GENERATOR_HPP
  #define IROHA_GENERATOR_HPP
  
  #include <algorithm>
  
  #include "common/types.hpp"
  
  namespace generator {
  
    /**
     * returns a number in a range [min, max)
     */
    int64_t random_number(int64_t min, int64_t max);
  
    template <size_t size_>
    iroha::blob_t<size_> random_blob(size_t seed) {
      iroha::blob_t<size_> v;
      srand(seed);
      std::generate_n(v.begin(), size_, [] { return rand() % 256; });
      return v;
    }
  
    /**
     * Generates new random string from lower-case letters
     * @param len - size of string to generate
     * @return generated string
     */
    std::string randomString(size_t len);
  
  }  // namespace generator
  
  #endif  // IROHA_GENERATOR_HPP
  