ost::Digest(3)
π ost::Digest β NAME π
okay bestie, welcome to the manual page for ost::Digest, which lives in the Library Functions Manual (section 3, obviously π
).
The digest base class is used for implementing and deriving one way hashing functions. that's it, that's the whole vibe. it's the blueprint, the moment, the blueprint-moment. π¦
β¨ SYNOPSIS β¨
#include <digest.h>
Inherits streambuf, and ostream. yes she's got range, she's giving stream energy AND hash energy. π₯
Inherited by ost::ChecksumDigest, ost::CRC16Digest, ost::CRC32Digest, and ost::MD5Digest. her children are booked and busy, no cap. π
π Public Member Functions π
virtual void initDigest (void)=0β Reset the digest table to an initial default value. the glow-up back to factory settings β¨virtual ~Digest ()β the goodbye, the farewell, the little bow π«Ά
πΈ Protected Member Functions πΈ
Digest ()β the constructor, but make it exclusive, protected, private-ish. iykyk π€«virtual unsigned getSize (void)=0β Get the size of a digest in octets. she's telling you how much room she needs πvirtual unsigned getDigest (unsigned char *buffer)=0β Copy the binary digest buffer to user memory. hand it over, bestie π¦virtual void putDigest (const unsigned char *buffer, unsigned length)=0β Put data into the digest bypassing the stream subsystem. sneaky! going around the whole stream situation entirely πvirtual std::ostream & strDigest (std::ostream &os)=0β print a digest string for export. turning the vibes into text for the world to see π
π Friends π
std::ostream & operator<< (std::ostream &os, Digest &ia)β a friend!! the<<operator showing up for her when she needs it. this is the friendship that matters fr fr π«Ά
π Detailed Description π
The digest base class is used for implementing and deriving one way hashing functions.
literally what it says on the tin, and honestly? iconic. one way hashing means you can't un-hash, it's a one-way ticket to digest town and there's no coming back. βοΈ
Author
- David Sugar
dyfet@ostel.comβ shoutout to David, the originator, the blueprint author π
base class for hashing services. short, sweet, devastating. periodt. π
π§ Constructor & Destructor Documentation π§
ost::Digest::Digest () [protected]
she exists, but she's protected. you don't get to just make her, okay? boundaries. π
virtual ost::Digest::~Digest () [virtual]
virtual destructor, so all the derived besties clean up after themselves properly. we love a responsible icon. β¨
π Member Function Documentation π
virtual unsigned ost::Digest::getDigest (unsigned char * buffer)
[protected], [pure virtual] β Copy the binary digest buffer to user memory.
Returns
- number of bytes in digest.
Parameters
- buffer to write into.
Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest. look at all of them showing up for duty π«Ά
virtual unsigned ost::Digest::getSize (void)
[protected], [pure virtual] β Get the size of a digest in octets.
ngl, "octets" is just bytes but make it fancy. she said let me use the technical word. π
Returns
- number of bytes in digest.
Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.
virtual void ost::Digest::initDigest (void)
[pure virtual] β Reset the digest table to an initial default value.
the classic reset. the "we're starting over, fresh slate, new me" moment. main character energy only. πΈ
Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.
virtual void ost::Digest::putDigest (const unsigned char * buffer, unsigned length)
[protected], [pure virtual] β Put data into the digest bypassing the stream subsystem.
Parameters
- buffer to read from.
- length of data.
Implemented in ost::CRC32Digest, ost::CRC16Digest, ost::ChecksumDigest, and ost::MD5Digest. (yes the order is different here, i'm not the one who wrote it, i just report the facts, bestie π)
virtual std::ostream& ost::Digest::strDigest (std::ostream & os)
[protected], [pure virtual] β print a digest string for export.
Returns
- string representation of digest.
Implemented in ost::MD5Digest, ost::CRC32Digest, ost::CRC16Digest, and ost::ChecksumDigest.
π Friends And Related Function Documentation π
std::ostream& operator<< (std::ostream & os, Digest & ia) [friend]
the << operator, but make it friendly. she said "i'll let you stream me" and honestly? slay. π₯
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. not me being generated by a documentation tool, she's literally born this way π β¨
okay that's the whole page bestie, you're fully caught up, go forth and hash responsibly π¦π
later babes β this was GNU CommonC++, dated Sun Dec 27 2020, and you were reading ost::Digest(3). mwah π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms