generator: improve iteration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e0448d6d08
commit
53cde1371f
|
@ -128,9 +128,10 @@ auto Generator::do_crypto() -> std::string {
|
|||
|
||||
auto Generator::generate_blocks(unsigned int k_blocks) -> std::string {
|
||||
assert((G.ctr != 0) && "Counter is not 0, generator has been seeded");
|
||||
|
||||
std::string r{""};
|
||||
for (uint i = 0; i < k_blocks; ++i) {
|
||||
r += do_crypto();
|
||||
while (k_blocks--) {
|
||||
r += Generator::do_crypto();
|
||||
++G.ctr;
|
||||
}
|
||||
return r;
|
||||
|
|
Reference in New Issue