libsaltpack
Loading...
Searching...
No Matches
Public Member Functions | List of all members
saltpack::ArmoredOutputStream Class Reference

Output Stream to generate BaseX armored content. More...

#include <ArmoredOutputStream.h>

Inheritance diagram for saltpack::ArmoredOutputStream:

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 ()
 

Detailed Description

Output Stream to generate BaseX armored content.

The alphabet used is BASE62.

Constructor & Destructor Documentation

◆ ArmoredOutputStream() [1/4]

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.

Parameters
outthe destination output stream.
appthe application name that will be added to the header/footer of the message.
modethe message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE.
lettersInWordsthe number of letters before producing a space during the armoring.
wordsInPhrasethe number of words before producing a new line during the armoring.
Exceptions
SaltpackException

◆ ArmoredOutputStream() [2/4]

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.

Parameters
outthe destination output stream.
appthe application name that will be added to the header/footer of the message.
modethe message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE.
Exceptions
SaltpackException

◆ ArmoredOutputStream() [3/4]

saltpack::ArmoredOutputStream::ArmoredOutputStream ( std::ostream & out,
int mode,
int lettersInWords,
int wordsInPhrase )

Creates a new ArmoredInputStream instance.

Parameters
outthe destination output stream.
modethe message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE.
lettersInWordsthe number of letters before producing a space during the armoring.
wordsInPhrasethe number of words before producing a new line during the armoring.
Exceptions
SaltpackException

◆ ArmoredOutputStream() [4/4]

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.

Parameters
outthe destination output stream.
modethe message mode, either saltpack::MODE_ENCRYPTION, saltpack::MODE_ATTACHED_SIGNATURE or saltpack::MODE_DETACHED_SIGNATURE.
Exceptions
SaltpackException

◆ ~ArmoredOutputStream()

saltpack::ArmoredOutputStream::~ArmoredOutputStream ( )
override

Destructor.

Member Function Documentation

◆ finalise()

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.

Exceptions
SaltpackException

◆ overflow()

int saltpack::ArmoredOutputStream::overflow ( int c)
override

Method overridden from std::streambuf (internal use only).

Parameters
cthe next character to output.

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