ISYMCRYPTSTREAMBUF(3bobcat)
π FBB::ISymCryptStreambuf π
okay bestie, sit down, hydrate, and let me tell you about FBB::ISymCryptStreambuf from the 3bobcat manual β she's a streambuf performing symmetric en/decryption and honestly? she's giving main character energy π
β¨ NAME β¨
FBB::ISymCryptStreambuf β a Streambuf performing symmetric en/decryption π
β¨ SYNOPSIS β¨
#include <bobcat/isymcryptstreambuf>
Linking option: -lbobcat -lcrypto
β¨ DESCRIPTION β¨
So like. FBB::ISymCryptStreambuf objects can be used as std::streambuf objects of std::istream objected, and encrypt or decrypt information that is made available via separate std::istream streams. literally doing the most for you π
The class ISymCryptStreambuf is a class template, using a FBB::CryptType template non-type parameter. Objects of the class FBB::ISymCryptStreambuf<FBB::ENCRYPT> encrypt the information they receive, objects of the class FBB::ISymCryptStreambuf<FBB::DECRYPT> decrypt the information they receive. no cap β¨
All symmetric encryption methods defined by the OpenSSL library that can be selected by name may be used to en/decrypt information. To select a particular encryption method an identifier is passed to the constructor. E.g., "aes-256-gcm". For an overview of the currently supported cipher algorithms issue the command π
openssl list -cipher-algorithms
ISymCryptStreambuf objects read the information to en/decrypt from std::istream objects, which are at construction-time specified as istream references or by filename. The characters that are thereupon extracted or read from ISymCryptStream objects are en/decrypted, and could, e.g., be written to some output stream. obsessed π¦
β¨ NAMESPACE β¨
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
β¨ INHERITS FROM β¨
FBB::ISymCryptBase (public)
The class FBB::ISymCryptBase is an internal use onlyβ class, derived from std::streambuf, and therefore ISymCryptStreambufis astd::streambuf` class. (yes she comes from a long line of icons π)
β¨ CONSTRUCTORS β¨
ISymCryptStreambuf<CryptType>(std::istream &inStream, std::string const &cipherName, std::string const &key, std::string const &iv, size_t inBufSize = 100)This constructor defines astd::streambufobject encrypting or decrypting the characters which are read frominStream. slay πISymCryptStreambuf<FBB::ENCRYPT>objects perform encryption;ISymCryptStreambuf<FBB::DECRYPT>objects perform decryption;ISymCryptStreambuf<CryptType>objects receive the characters to encrypt or decrypt fromstd::istream ∈- The encryption method to use is specified by the
cipherNameparameter. E.g.,"AES-256-GCM"; - The symmetric key to use is specified by the
keyparameter; - The initialization vector is specified by the
ivparameter; - The
FBB::ISymCryptStreambufbufinternally used buffer will holdinBufSizecharacters. The default value is the smallest value that is used. When specifying a smallerbufSizevalue than the default value then the default value is used;
ISymCryptStreambuf<CryptType>(std::string const &inStreamName, std::string const &cipherName, std::string const &key, std::string const &iv, size_t inBufSize = 100)Same constructor as the previous one, but this constructorβs first parameter specifies the name of the file containing the characters to encrypt or decrypt. π
If the construction fails an exception is thrown, mentioning the openssl function that failed to complete (see also errorMsg below).
The move constructor is available, the copy constructor and assignment operators are not available,
π«Ά heads up bestie: move = yes, copy + assignment = absolutely not.
β¨ INHERITED MEMBERS β¨
Since the class is publicly derived from std::istreambuf, all std::streambuf members can can be used. π
β¨ MEMBER FUNCTIONS β¨
static std::string errorMsg()If an openssl function fails an exception is thrown mentioning the name of the failing function. In those cases the functionerrorMsgcan be called returning astd::stringcontaining the openssl error code (returned byERR_get_error) and its textual representation (returned byERR_error_string). If the reported error code is zero, then in fact no error has occurred and the exception was spuriously reported; πstatic size_t keyLength(std::string const &cipherName)returns the minimum key length required for ciphercipherName;static size_t ivLength(std::sting const &cipherName)returns the minimum length of the initialization vector that is required for ciphercipherName.
The latter two functions throw exceptions if cipherName does not contain the name of a supported cipher algorithm. π
β¨ EXAMPLE β¨
See the example in the isymcryptstream(3bobcat) man-page. Instead of defining an ISymCryptStream an ISymCryptStreamBuf can be defined, passing its address to a std::istream which can then be used as the ISymCryptStream used in the example. β¨
β¨ FILES β¨
bobcat/isymcryptstream β defines the class interface πΈ
β¨ SEE ALSO β¨
bobcat(7), isymcryptstream(3bobcat), osymcryptstream(3bobcat), osymcryptstreambuf(3bobcat)
β¨ BUGS β¨
None Reported. π (iconic behaviour honestly)
β¨ BOBCAT PROJECT FILES β¨
https://fbb-git.gitlab.io/bobcat/: gitlab project page;
Debian Bobcat project files:
libbobcat6: debian package containing the shared library, changelog and copyright note;libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;
β¨ BOBCAT β¨
Bobcat is an acronym of `Brokkenβs Own Base Classes And Templatesβ. π
β¨ 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). π
and that's the whole page bestie!! this one shipped with libbobcat-dev_6.15.01, dated 2005-2026, and it's titled FBB::I...reambuf(3bobcat) β Symmetric en- and decryption π
β¨ no cap, go encrypt something cute π
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms