.TH "FBB::IBase64Buf" "3bobcat" "2005\-2020" "libbobcat\-dev_5\&.07\&.00" "Base64 converting Stream Buffer" .PP .SH "NAME" FBB::IBase64Buf \- Input Filtering stream buffer doing base64 conversion .PP .SH "SYNOPSIS" \fB#include \fP .br Linking option: \fI\-lbobcat\fP .PP .SH "DESCRIPTION" The information made available by \fBIBase64Buf\fP objects has been subject to base64 encoding or decoding\&. The information to be converted is made available to \fBIBase64Buf\fP object via \fIstd::istream\fP objects\&. .PP The \fIclass IBase64Buf\fP is a class template, using a \fIFBB::CryptType\fP template non\-type parameter\&. Objects of the class \fIFBB::IBase64Buf\fP base64 encode the information they receive, objects of the class \fIFBB::IBase64Buf\fP base64 decode the information they receive\&. See also section \fBENUMERATION\fP below\&. .PP .SH "NAMESPACE" \fBFBB\fP .br All constructors, members, operators and manipulators, mentioned in this man\-page, are defined in the namespace \fBFBB\fP\&. .PP .SH "INHERITS FROM" \fBFBB::IFilterBuf\fP .PP .SH "ENUMERATION" .PP \fBIBase64Buf\fP objects either base64 encode or decode information\&. \fBIBase64Buf\fP objects of the class \fBFBB::IBase64Buf\fP base64 encode the data they receive, \fBIBase64Buf\fP objects of the class \fBFBB::IBase64Buf\fP base64 decode the data they receive\&. .PP The values \fIENCRYPT\fP and \fIDECRYPT\fP are defined in the \fIenum CryptType\fP, which is defined in the \fIFBB\fP namespace\&. .PP .SH "CONSTRUCTOR" .IP o \fBIBase64Buf(std::istream &in, size_t bufSize = 1000)\fP: .br This constructor initializes the streambuf\&. .IP \- \fIIBase64Buf\fP objects perform base64 encoding; .br \- \fIIBase64Buf\fP objects perform base64 decoding; .br \- \fIIBase64Buf\fP objects obtain the bytes to encode or decode from \fIstd::istream &in\fP; .br \- The \fIIFilterBuf\fP base class is initialized with a buffer of size \fIbufSize\fP, using a lower bound of 100\&. .IP The constructor uses a configurable buffer size for reading\&. Characters that were read into the buffer but are not part of the actual base64 encoded data are unavailable after completing the base64 decrypting\&. If information beyond the base64 input block should remain available, then specify a buffer size of 1\&. .PP Copy and move constructors (and assignment operators) are not available\&. .PP .SH "MEMBER FUNCTIONS" All members of \fBFBB::IFilterBuf\fP are available, as \fBIBase64Buf\fP inherits from this class\&. .PP .SH "EXAMPLE" .PP The example shows the construction of \fIIBase64Buf\fP objects \fIencode\fP which are used to initialize a \fIstd::istream\fP object\&. The information read from this \fIistream\fP is base64 encoded\&. .PP \fIIBase64Buf\fP objects (\fIdecode\fP reads base64 encoded information from \fIstd::istream\fP objects and decodes it again)\&. .PP The \fIstd::istream din\fP object is initialized with the \fIIBase64Buf\fP object, and its content is sent to \fIstd::cout\fP\&. The information that is presented at \fIstd::cin\fP and that appears at \fIstd::cout\fP should be identical\&. .PP .nf #include #include #include using namespace std; using namespace FBB; int main(int argc, char **argv) { switch (argv[1][0]) { case \(cq\&e\(cq\&: { IBase64Buf encode(cin); istream ein(&encode); cout << ein\&.rdbuf(); } break; case \(cq\&d\(cq\&: { IBase64Buf decode(cin); istream din(&decode); cout << din\&.rdbuf(); } break; case \(cq\&b\(cq\&: { IBase64Buf encode(cin); istream ein(&encode); IBase64Buf decode(ein); istream din(&decode); cout << din\&.rdbuf(); } break; default: cout << \(dq\&Usage: \(dq\& << argv[0] << \(dq\& [edb] < infile > outfile\en\(dq\& \(dq\&to base64 \-e\-ncode, \-d\-ecode or \-b\-oth\en\(dq\&; break; } } .fi .PP .SH "FILES" \fIbobcat/ibase64buf\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7), \fBisymcryptstreambuf\fP(3bobcat), \fBibase64stream\fP(3bobcat), \fBifilterbuf\fP(3bobcat), \fBofilterbuf\fP(3bobcat), \fBstd::streambuf\fP\&. .PP .SH "BUGS" None reported\&. .PP .SH "BOBCAT PROJECT FILES" .PP .IP o \fIhttps://fbb\-git\&.gitlab\&.io/bobcat/\fP: gitlab project page; .IP o \fIbobcat_5\&.07\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_5\&.07\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_5\&.07\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries; .IP o \fIlibbobcat1\-dev_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries, headers and manual pages; .PP .SH "BOBCAT" Bobcat is an acronym of `Brokken\(cq\&s Own Base Classes And Templates\(cq\&\&. .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the GNU General Public License (GPL)\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&. .PP