8#ifndef INCLUDED_BDLDE_MD5
9#define INCLUDED_BDLDE_MD5
170#include <bdlscm_version.h>
176#include <bsl_cstring.h>
177#include <bsl_iosfwd.h>
205 unsigned int d_state[4];
209 unsigned char d_buffer[64];
246 Md5(
const void *data,
int length);
257#if defined(BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS)
260 Md5& operator=(
const Md5& rhs) =
default;
273 template <
class STREAM>
292 void update(
const void *data,
int length);
309 template <
class STREAM>
314 bsl::ostream&
print(bsl::ostream& stream)
const;
320#ifndef BDE_OMIT_DEPRECATED
335bool operator==(
const Md5& lhs,
const Md5& rhs);
342bool operator!=(
const Md5& lhs,
const Md5& rhs);
365template <
class STREAM>
370 unsigned int state[4];
371 unsigned char buf[64];
376 for (
int i = 0; i < 4; i++) {
377 stream.getUint32(state[i]);
382 stream.getInt64(length);
386 for (
int i = 0; i < 64; i++) {
387 stream.getUint8(buf[i]);
395 bsl::memcpy(d_state, state,
sizeof state);
396 bsl::memcpy(d_buffer, buf,
sizeof buf);
407template <
class STREAM>
415 for (
int i = 0; i < 4; ++i) {
416 stream.putUint32(d_state[i]);
421 stream.putInt64(d_length);
425 for (
int i = 0; i < 64; ++i) {
426 stream.putUint8(d_buffer[i]);
438#ifndef BDE_OMIT_DEPRECATED
452 return !(lhs == rhs);
458 return digest.print(stream);
Definition bdlde_md5.h:202
void loadDigest(Md5Digest *result) const
bsls::AlignedBuffer< 16 > Md5Digest
Definition bdlde_md5.h:221
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition bdlde_md5.h:366
static int maxSupportedBdexVersion()
Definition bdlde_md5.h:440
friend bool operator==(const Md5 &, const Md5 &)
Md5(const void *data, int length)
void update(const void *data, int length)
void loadDigestAndReset(Md5Digest *result)
bsl::ostream & print(bsl::ostream &stream) const
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition bdlde_md5.h:408
~Md5()
Destroy this MD5 digest.
Definition bsls_alignedbuffer.h:262
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlde_base64alphabet.h:118
bool operator!=(const Base64DecoderOptions &lhs, const Base64DecoderOptions &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, Base64Alphabet::Enum value)
long long Int64
Definition bsls_types.h:134