libsaltpack
|
Output Stream to generate BaseX armored content. More...
#include <ArmoredOutputStream.h>
Public Member Functions | |
ArmoredOutputStream (std::ostream &out, const std::string &app, int mode, int lettersInWords, int wordsInPhrase) | |
ArmoredOutputStream (std::ostream &out, const std::string &app, int mode) | |
ArmoredOutputStream (std::ostream &out, int mode, int lettersInWords, int wordsInPhrase) | |
ArmoredOutputStream (std::ostream &out, int mode) | |
~ArmoredOutputStream () override | |
int | overflow (int c) override |
void | finalise () |
Output Stream to generate BaseX armored content.
The alphabet used is BASE62.
saltpack::ArmoredOutputStream::ArmoredOutputStream | ( | std::ostream & | out, |
const std::string & | app, | ||
int | mode, | ||
int | lettersInWords, | ||
int | wordsInPhrase ) |
Creates a new ArmoredInputStream instance for a specific application.
out | the destination output stream. |
app | the application name that will be added to the header/footer of the message. |
mode | the message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE. |
lettersInWords | the number of letters before producing a space during the armoring. |
wordsInPhrase | the number of words before producing a new line during the armoring. |
SaltpackException |
saltpack::ArmoredOutputStream::ArmoredOutputStream | ( | std::ostream & | out, |
const std::string & | app, | ||
int | mode ) |
Creates a new ArmoredInputStream instance for a specific application. This instance will produce a space every 15 letters and a new line after 200 words.
out | the destination output stream. |
app | the application name that will be added to the header/footer of the message. |
mode | the message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE. |
SaltpackException |
saltpack::ArmoredOutputStream::ArmoredOutputStream | ( | std::ostream & | out, |
int | mode, | ||
int | lettersInWords, | ||
int | wordsInPhrase ) |
Creates a new ArmoredInputStream instance.
out | the destination output stream. |
mode | the message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE. |
lettersInWords | the number of letters before producing a space during the armoring. |
wordsInPhrase | the number of words before producing a new line during the armoring. |
SaltpackException |
saltpack::ArmoredOutputStream::ArmoredOutputStream | ( | std::ostream & | out, |
int | mode ) |
Creates a new ArmoredInputStream instance. This instance will produce a space every 15 letters and a new line after 200 words.
out | the destination output stream. |
mode | the message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE. |
SaltpackException |
|
override |
Destructor.
void saltpack::ArmoredOutputStream::finalise | ( | ) |
Finalises the stream. This method must be called when after MessageWriter::finalise() in order to flush the remaining characters and produce the footer.
SaltpackException |
|
override |
Method overridden from std::streambuf (internal use only).
c | the next character to output. |