.TH "FBB::ISymCryptStream" "3bobcat" "2005\-2016" "libbobcat\-dev_4\&.04\&.00\-x\&.tar\&.gz" "Symmetric en\- and decryption" .PP .SH "NAME" FBB::ISymCryptStream \- Istream performing symmetric encryption .PP .SH "SYNOPSIS" \fB#include \fP .br Linking option: \fI\-lbobcat \-lcrypto\fP .PP .SH "DESCRIPTION" \fBFBB::ISymCryptStream\fP objects may be used to encrypt or decrypt information that is available on a separate \fIstd::istream\fP\&. .PP The \fIclass ISymCryptStream\fP is a class template, using a \fIFBB::CryptType\fP template non\-type parameter\&. Objects of the class \fIFBB::ISymCryptStream\fP encrypt the information they receive, objects of the class \fIFBB::ISymCryptStream\fP decrypt the information they receive\&. .PP All symmetric encryption methods defined by the OpenSSL library that can be selected by name may be used in combination with \fIEncryptBuf\fP objects\&. To select a particular encryption method an identifier is passed to the constructor\&. E\&.g\&., \fI\(dq\&aes\-128\-cbc\(dq\&\fP indicating the AES (Rijndael) method, using 128 bit sized keys and blocks using `cbc\(cq\& mode (see below for an explanation)\&. .PP Refer to the \fBisymcryptstreambuf\fP(3bobcat) man\-page for a description of available encryption methods\&. .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::ISymCryptStreambuf\fP (private), .br \fBstd::istream\fP .PP .SH "CONSTRUCTOR" .IP o \fBISymCryptStream( std::istream &in, char const *type, std::string const &key, std::string const &iv, size_t bufSize = 100, size_t filterBufSize = 1000, ENGINE *engine = 0)\fP: .br This constructor initializes a \fIstd::istream\fP providing it with an \fIFBB::ISymCryptStreambuf\fP stream buffer\&. The \fIISymCryptStreambuf\fP\(cq\&s constructor receives all arguments that are passed to this constructor\&. .IP \- \fIISymCryptStream\fP objects perform encryption; .br \fIISymCryptStream\fP objects perform decryption; .br \- \fIISymCryptStream\fP objects obtain the bytes to encrypt or decrypt from \fIstd::istream &in\fP; .br \- The encryption method to use is specified by the \fItype\fP parameter\&. E\&.g\&., \fI\(dq\&bf\-cbc\(dq\&\fP selects the Blowfish Cipher Block Chaining method; .br \- The symmetric key to use is specified by the \fIkey\fP parameter; .br \- The initialization vector is specified by the \fIiv\fP parameter; .br \- The \fIFBB::ISymCryptStreambuf\fP internally used buffer will contain \fIbufSize\fP characters\&. The default value is the smallest value that is used\&. When a smaller \fIbufSize\fP value is specified, the default value is used; .br \- The internally used \fIIFilterStreambuf\fP is initialized with a buffer of size \fIfilterBufSize\fP, using a lower bound of 100; .br \- The parameter \fIENGINE\fP can be used to specify a hardware acceleration engine, as supported by the used encryption/decryption method\&. Its default argument value indicates that no hardware acceleration is available\&. .PP .SH "INHERITED MEMBERS" .PP Since the class uses public derivation from \fBstd::istream\fP, all members of this class can be used\&. .PP .SH "EXAMPLE" .nf #include \(dq\&\&.\&./isymcryptstream\(dq\& #include using namespace std; using namespace FBB; int main() { ISymCryptStream encryptor(cin, \(dq\&bf\-cbc\(dq\&, \(dq\&1234567890\(dq\&, \(dq\&1234567890\(dq\&); ISymCryptStream decryptor(encryptor, \(dq\&bf\-cbc\(dq\&, \(dq\&1234567890\(dq\&, \(dq\&1234567890\(dq\&); cout << decryptor\&.rdbuf(); } .fi .PP .SH "FILES" \fIbobcat/isymcryptstream\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7), \fBisymcryptstreambuf\fP(3bobcat) .PP .SH "BUGS" .PP Sep/Oct 2013: due to a change in library handling by the linker (cf\&. http://fedoraproject\&.org/wiki/UnderstandingDSOLinkChange and https://wiki\&.debian\&.org/ToolChain/DSOLinking) libraries that are indirectly required are no longer automatically linked to your program\&. With \fBBigInt\fP this is \fIlibcrypto\fP, which requires programs to link to both \fIbobcat\fP and \fIcrypto\fP\&. .PP .SH "DISTRIBUTION FILES" .IP o \fIbobcat_4\&.04\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_4\&.04\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_4\&.04\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_4\&.04\&.00\-x_*\&.deb\fP: debian package holding the libraries; .IP o \fIlibbobcat1\-dev_4\&.04\&.00\-x_*\&.deb\fP: debian package holding the libraries, headers and manual pages; .IP o \fIhttp://sourceforge\&.net/projects/bobcat\fP: public archive location; .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