This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
fortuna/generator.h
surtur 7a133ab2dc
All checks were successful
continuous-integration/drone/push Build is passing
namespace-wrap the generator function block
* the purpose is to subdivide the global scope
* use 'fortuna' as the top-level namespace
* use 'generator' namespace for the generator functions
* wrap the entire file after includes
2021-11-02 04:40:07 +01:00

30 lines
722 B
C++

#ifndef FORTUNA_GENERATOR_H
#define FORTUNA_GENERATOR_H
#include <string>
#include <cstring>
#include <tuple>
namespace fortuna {
namespace generator {
struct G_state;
/* initializes generator */
G_state *initialize_generator();
auto do_crypto(int64_t k, unsigned __int128 ctr) -> std::string;
auto reseed(G_state G, const std::string& s) -> std::tuple<G_state, unsigned __int128>;
auto do_sha(int64_t key_with_seed) -> int64_t;
auto generate_blocks(G_state G, int k_blocks) -> std::tuple<std::string, G_state>;
/* returns output of 0 <= n <= 2^20 bytes */
auto generate_random_data(G_state G, int n) -> std::tuple<std::string, G_state>;
} //namespace generator
} //namespace fortuna
#endif//FORTUNA_GENERATOR_H