bkcrack: include/bkcrack/file.hpp Source File

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

file.hpp
1#ifndef BKCRACK_FILE_HPP
2#define BKCRACK_FILE_HPP
3
4#include <bkcrack/types.hpp>
5
6#include <fstream>
7
9 class FileError : public BaseError
10{
11public:
13 explicit FileError(const std::string& description);
14};
15
18auto openInput(const std::string& filename) -> std::ifstream;
19
21auto loadStream(std::istream& is, std::size_t size) -> std::vector<std::uint8_t>;
22
25auto openOutput(const std::string& filename) -> std::ofstream;
26
27#endif // BKCRACK_FILE_HPP
BaseError::BaseError
BaseError(const std::string &type, const std::string &description)
Constructor.
FileError::FileError
FileError(const std::string &description)
Constructor.
types.hpp
Useful types, constants and utility functions.