GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  IBASE64STREAMBUF (3)

NAME

FBB::IBase64Streambuf - Input Filtering stream buffer doing base64 conversion

CONTENTS

SYNOPSIS

#include <bobcat/ibase64streambuf>
Linking option: -lbobcat

DESCRIPTION

The information made available by IBase64Streambuf objects has been subject to base64 encoding or decoding. The information to be converted is made available to IBase64Streambuf object via std::istream objects.

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

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

FBB::IFilterStreambuf

MEMBER FUNCTIONS

All members of FBB::IFilterStreambuf are available, as IBase64Streambuf inherits from this class.

Overloaded move and/or copy assignment operators are not available.

ENUMERATION

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

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

CONSTRUCTOR

o IBase64Streambuf<CryptType>(std::istream &in, size_t bufSize = 1000):
This constructor initializes the streambuf.
- IBase64Streambuf<ENCRYPT> objects perform base64 encoding;
- IBase64Streambuf<DECRYPT> objects perform base64 decoding;
- IBase64Streambuf<CryptType> objects obtain the bytes to encode or decode from std::istream &in;
- The IFilterStreambuf base class is initialized with a buffer of size bufSize, using a lower bound of 100. Copy- and move constructors are not available.

EXAMPLE

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

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

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

#include <iostream>
#include <istream>

#include <bobcat/ibase64streambuf>

using namespace std; using namespace FBB;

int main(int argc, char **argv) { switch (argv[1][0]) { case \(cqe\(cq: { IBase64Streambuf<ENCRYPT> encode(cin); istream ein(&encode); cout << ein.rdbuf(); } break;

case \(cqd\(cq: { IBase64Streambuf<DECRYPT> decode(cin); istream din(&decode); cout << din.rdbuf(); } break; case \(cqb\(cq: { IBase64Streambuf<ENCRYPT> encode(cin); istream ein(&encode);

IBase64Streambuf<DECRYPT> decode(ein); istream din(&decode); cout << din.rdbuf(); } break;

default: cout << \(dqUsage: \(dq << argv[0] << \(dq [edb] < infile > outfile\n\(dq \(dqto base64 -e-ncode, -d-ecode or -b-oth\n\(dq; break; } }

FILES

bobcat/ibase64streambuf - defines the class interface

SEE ALSO

bobcat(7), isymcryptstreambuf(3bobcat), ibase64stream(3bobcat), ifilterstreambuf(3bobcat), ofilterstreambuf(3bobcat), std::streambuf.

BUGS

None reported.

DISTRIBUTION FILES

o bobcat_3.25.01-x.dsc: detached signature;
o bobcat_3.25.01-x.tar.gz: source archive;
o bobcat_3.25.01-x_i386.changes: change log;
o libbobcat1_3.25.01-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.25.01-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;

BOBCAT

Bobcat is an acronym of ‘Brokken\(cqs Own Base Classes And Templates\(cq.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).

Search for    or go to Top of page |  Section 3 |  Main Index


libbobcat-dev_3&.25&.01-x&.tar&.gz FBB::IBASE64STREAMBUF (3bobcat) 2005-2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.