bkcrack 1.7.1
Crack legacy zip encryption with Biham and Kocher's known plaintext attack.
password.hpp File Reference
#include "Keys.hpp"
#include "Progress.hpp"

Go to the source code of this file.

Functions

auto recoverPassword (const Keys &keys, const std::vector< std::uint8_t > &charset, std::size_t minLength, std::size_t maxLength, std::string &start, int jobs, bool exhaustive, Progress &progress) -> std::vector< std::string >
 Try to recover the password associated with the given keys.
 

Function Documentation

◆ recoverPassword()

auto recoverPassword ( const Keys & keys,
const std::vector< std::uint8_t > & charset,
std::size_t minLength,
std::size_t maxLength,
std::string & start,
int jobs,
bool exhaustive,
Progress & progress ) -> std::vector< std::string >

Try to recover the password associated with the given keys.

Parameters
keysInternal keys for which a password is wanted
charsetThe set of characters with which to constitute password candidates
minLengthThe smallest password length to try
maxLengthThe greatest password length to try
startStarting point in the password search space. Also used as an output parameter to tell where to restart.
jobsNumber of threads to use
exhaustiveTrue to try and find all valid passwords, false to stop searching after the first one is found
progressObject to report progress
Returns
A vector of passwords associated with the given keys. A vector is needed instead of a single string because there can be collisions (i.e. several passwords for the same keys).