/usr/include/bobcat/base64streambufbase is in libbobcat-dev 3.23.01-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #ifndef INCLUDED_BOBCAT_BASE64STREAMBUFBASE_
#define INCLUDED_BOBCAT_BASE64STREAMBUFBASE_
#include <istream>
#include <string>
#include <bobcat/ifilterstreambuf>
namespace FBB
{
namespace IUO // the facilities defined here are not further documented:
{ // the Base64StreambufBase class defined below should be
// used by IBase64Streambuf only.
class Base64StreambufBase: public FBB::IFilterStreambuf
{
std::istream &d_in;
bool (Base64StreambufBase::*d_action)();
size_t d_bufSize;
std::string d_buffer;
bool d_allDone = false;
static std::string const s_tabStr;
public:
Base64StreambufBase(std::istream &in, size_t bufSize);
protected:
void doEncrypt();
void doDecrypt();
private:
bool filter(char const **srcBegin, char const **srcEnd) override;
bool encrypt(); // false means: don't call again, but there
// may still be input waiting in d_buffer
bool decrypt();
template <int from, int size, int shl = 0>
static int bits(int value);
static size_t indexOf(int ch);
};
template <int from, int size, int shl>
inline int Base64StreambufBase::bits(int value)
{
return value == EOF ? 0 :
(value & ((1 << (from + size)) - 1)) >> from << shl;
}
} // IUO
} // FBB
#endif
|