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];
243 Md5(
const void *data,
int length);
254#if defined(BSLS_COMPILERFEATURES_SUPPORT_DEFAULTED_FUNCTIONS)
257 Md5& operator=(
const Md5& rhs) =
default;
269 template <
class STREAM>
286 void update(
const void *data,
int length);
303 template <
class STREAM>
308 bsl::ostream&
print(bsl::ostream& stream)
const;
314#ifndef BDE_OMIT_DEPRECATED
329bool operator==(
const Md5& lhs,
const Md5& rhs);
336bool operator!=(
const Md5& lhs,
const Md5& rhs);
359template <
class STREAM>
364 unsigned int state[4];
365 unsigned char buf[64];
370 for (
int i = 0; i < 4; i++) {
371 stream.getUint32(state[i]);
376 stream.getInt64(length);
380 for (
int i = 0; i < 64; i++) {
381 stream.getUint8(buf[i]);
389 bsl::memcpy(d_state, state,
sizeof state);
390 bsl::memcpy(d_buffer, buf,
sizeof buf);
401template <
class STREAM>
409 for (
int i = 0; i < 4; ++i) {
410 stream.putUint32(d_state[i]);
415 stream.putInt64(d_length);
419 for (
int i = 0; i < 64; ++i) {
420 stream.putUint8(d_buffer[i]);
432#ifndef BDE_OMIT_DEPRECATED
446 return !(lhs == rhs);
452 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:360
static int maxSupportedBdexVersion()
Definition bdlde_md5.h:434
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:402
~Md5()
Destroy this MD5 digest.
Definition bsls_alignedbuffer.h:261
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
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:132