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

30 lines
691 B
C
Raw Normal View History

2021-10-19 15:05:18 +02:00
#ifndef FORTUNA_GENERATOR_H
#define FORTUNA_GENERATOR_H
#include <string>
#include <cstring>
#include <tuple>
2021-10-19 15:05:18 +02:00
namespace fortuna {
namespace generator {
2021-10-19 15:05:18 +02:00
struct G_state;
/* initializes generator */
G_state *initialize_generator();
2021-10-30 21:37:47 +02:00
auto do_crypto(int64_t k, unsigned __int128 ctr) -> std::string;
2021-10-24 22:11:29 +02:00
auto reseed(G_state G, const std::string& s) -> G_state;
2021-10-30 21:37:47 +02:00
auto do_sha(int64_t key_with_seed) -> int64_t;
2021-10-30 21:37:47 +02:00
auto generate_blocks(G_state G, int k_blocks) -> std::tuple<std::string, G_state>;
2021-10-19 15:05:18 +02:00
/* returns output of 0 <= n <= 2^20 bytes */
2021-10-30 21:37:47 +02:00
auto generate_random_data(G_state G, int n) -> std::tuple<std::string, G_state>;
2021-10-19 15:05:18 +02:00
} //namespace generator
} //namespace fortuna
2021-10-19 15:05:18 +02:00
#endif//FORTUNA_GENERATOR_H