ost::Digest(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– 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.


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