includefile(include/header)

COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::IBase64Buf)(3bobcat)(_CurYrs_)
        (libbobcat-dev__CurVers_)
        (Base64 converting Stream Buffer)

manpagename(FBB::IBase64Buf)
            (Input Filtering stream buffer doing base64 conversion)

manpagesynopsis()
    bf(#include <bobcat/ibase64buf>)nl()
    Linking option: tt(-lbobcat) 

manpagedescription()
    The information made available by bf(IBase64Buf) objects has been
subject to base64 encoding or decoding. The information to be converted is
made available to bf(IBase64Buf) object via tt(std::istream) objects.

    The tt(class IBase64Buf) is a class template, using a
tt(FBB::CryptType) template non-type parameter. Objects of the class
tt(FBB::IBase64Buf<FBB::ENCRYPT>) base64 encode the information they
receive, objects of the class tt(FBB::IBase64Buf<FBB::DECRYPT>) base64
decode the information they receive. See also section bf(ENUMERATION) below.


includefile(include/namespace)

manpagesection(INHERITS FROM)
    bf(FBB::IFilterBuf)

manpagesection(ENUMERATION)

    bf(IBase64Buf) objects either base64 encode or decode
information. bf(IBase64Buf) objects of the class
bf(FBB::IBase64Buf<FBB::ENCRYPT>) base64 encode the data they receive,
bf(IBase64Buf) objects of the class
bf(FBB::IBase64Buf<FBB::DECRYPT>) base64 decode the data they receive.

The values tt(ENCRYPT) and tt(DECRYPT) are defined in the tt(enum CryptType),
which is defined in the tt(FBB) namespace.

manpagesection(CONSTRUCTOR)
    itemization(
    itb(IBase64Buf<CryptType>(std::istream &in, size_t bufSize = 1000))
        This constructor initializes the streambuf.

    - tt(IBase64Buf<ENCRYPT>) objects perform base64 encoding;nl()
    - tt(IBase64Buf<DECRYPT>) objects perform base64 decoding;nl()
    - tt(IBase64Buf<CryptType>) objects obtain the bytes to encode or
decode from tt(std::istream &in);nl()
    - The tt(IFilterBuf) base class is initialized with a buffer of
size tt(bufSize), using a lower bound of 100.

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

    Copy and move constructors (and assignment operators) are not available.

manpagesection(MEMBER FUNCTIONS)
     All members of bf(FBB::IFilterBuf) are available, as
bf(IBase64Buf) inherits from this class.

manpagesection(EXAMPLE)

    The example shows the construction of tt(IBase64Buf<ENCRYPT>)
objects tt(encode) which are used to initialize a tt(std::istream) object. The
information read from this tt(istream) is base64 encoded. 

tt(IBase64Buf<DECRYPT>) objects (tt(decode) reads base64 encoded
information from tt(std::istream) objects and decodes it again). 

The tt(std::istream din) object is initialized with the
tt(IBase64Buf<DECRYPT>) object, and its content is sent to
tt(std::cout). The information that is presented at tt(std::cin) and that
appears at tt(std::cout) should be identical.

    verbinclude(../../ibase64buf/driver/driver.cc)

manpagefiles()
    em(bobcat/ibase64buf) - defines the class interface

manpageseealso()
    bf(bobcat)(7), bf(isymcryptstreambuf)(3bobcat),
bf(ibase64stream)(3bobcat), bf(ifilterbuf)(3bobcat),
bf(ofilterbuf)(3bobcat), bf(std::streambuf).

manpagebugs()
    None reported.

includefile(include/trailer)


