#include <coder.hpp>
|
virtual | ~Encoder ()=default |
|
virtual bool | encode_string (const std::string &decoded, std::string &encoded) |
|
virtual bool | encode_file (const std::filesystem::path &decoded, const std::filesystem::path &encoded) |
|
|
virtual bool | encode_internal (std::istream &decoded, std::ostream &encoded)=0 |
|
Virtual interface to encode a string or file with a plaintext encoder. Coders for specific algorithms should inherit from this class to perform encoding.
- Author
- Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
- Version
- July 7, 2019
◆ ~Encoder()
virtual fly::coders::Encoder::~Encoder |
( |
| ) |
|
|
virtualdefault |
◆ encode_file()
bool fly::coders::Encoder::encode_file |
( |
const std::filesystem::path & |
decoded, |
|
|
const std::filesystem::path & |
encoded |
|
) |
| |
|
virtual |
Encode a file.
- Parameters
-
decoded | Path holding the contents to encode. |
encoded | Path to store the encoded contents. |
- Returns
- True if the input file was successfully encoded.
◆ encode_internal()
virtual bool fly::coders::Encoder::encode_internal |
( |
std::istream & |
decoded, |
|
|
std::ostream & |
encoded |
|
) |
| |
|
protectedpure virtual |
◆ encode_string()
bool fly::coders::Encoder::encode_string |
( |
const std::string & |
decoded, |
|
|
std::string & |
encoded |
|
) |
| |
|
virtual |
Encode a string.
- Parameters
-
decoded | String holding the contents to encode. |
encoded | String to store the encoded contents. |
- Returns
- True if the input string was successfully encoded.
The documentation for this class was generated from the following files: