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 46e5048788
All checks were successful
continuous-integration/drone/push Build is passing
add reseed() and do_sha() functions
currently the bodies of the functions are pretty much bogus
2021-10-30 21:42:47 +02:00

25 lines
593 B
C++

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