bkcrack: Progress Class Reference

bkcrack 1.8.1 Crack legacy zip encryption with Biham and Kocher's known plaintext attack.

Progress Class Reference

Structure to report the progress of a long operation or to cancel it. More...

`#include <bkcrack/Progress.hpp>`

Inheritance diagram for Progress:
[legend]

## Public Types
enum class | State { Normal , Canceled , EarlyExit }
| Possible states of a long operation. More...

## Public Member Functions
| Progress (std::ostream &os)
| Constructor.
template<std::invocable< std::ostream & > F>
void | log (F f)

## Public Attributes
std::atomic< State > | state = State::Normal
| State of the long operation.
std::atomic< int > | done = 0
| Number of steps already done.
std::atomic< int > | total = 0
| Total number of steps.

## Detailed Description

Structure to report the progress of a long operation or to cancel it.

## Member Enumeration Documentation

## ◆ State

enum class Progress::State
| strong

Possible states of a long operation.

Enumerator
Normal | The operation is ongoing or is fully completed.
Canceled | The operation has been canceled externally.
EarlyExit | The operation stopped after a partial result was found.

## Member Function Documentation

## ◆ log()

template<std::invocable< std::ostream & > F>

void Progress::log | ( | F | f | ) |
| inline

Get exclusive access to the shared output stream and output progress information with the given function

The documentation for this class was generated from the following file:

- include/bkcrack/Progress.hpp