[#BloombergLP-bdlde-Md5]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::Md5
:relfileprefix: ../../
:mrdocs:

This `class` represents an MD5 digest that can be updated as additional data is provided&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;md5&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Md5;
----

== Description

More generally, this class supports a complete set of _value_ _semantic_ operations, including copy construction, assignment, equality comparison, `ostream` printing, and `bdex` serialization&period; (A precise operational definition of when two instances have the same value can be found in the description of `operator&equals;&equals;` for the class&period;) This container is _exception_ _neutral_ with no guarantee of rollback&colon; if an exception is thrown during the invocation of a method on a pre&hyphen;existing instance, the class is left in a valid state, but its value is undefined&period; In no event is memory leaked&period; Finally, _aliasing_ (e&period;g&period;, using all or part of an object as both source and destination) is supported in all cases&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/Md5/Md5Digest.adoc[`Md5Digest`] 
| A maximally&hyphen;aligned, 16&hyphen;byte object type used to represent an MD5 digest&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/Md5/2constructor-08.adoc[`Md5`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlde/Md5/2destructor.adoc[`&#126;Md5`] [.small]#[destructor]#
| Destroy this MD5 digest&period;
| xref:BloombergLP/bdlde/Md5/operator_assign.adoc[`operator&equals;`] 
| Assign to this MD5 digest the value of the specified `rhs` MD5 digest and return a reference to this modifiable MD5 digest&period;
| xref:BloombergLP/bdlde/Md5/bdexStreamIn.adoc[`bdexStreamIn`] 
| Assign to this object the value read from the specified input `stream` using the specified `version` format and return a reference to the modifiable `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `stream` becomes invalid during this operation, this object is valid, but its value is undefined&period; If the specified `version` is not supported, `stream` is marked invalid, but this object is unaltered&period; Note that no version is read from `stream`&period; (See the package&hyphen;group&hyphen;level documentation for more information on `bdex` streaming of container types&period;)
| xref:BloombergLP/bdlde/Md5/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this value to the specified output `stream` and return a reference to the modifiable `stream`&period; Optionally specify an explicit `version` format&semi; by default, the maximum supported version is written to `stream` and used as the format&period; If `version` is specified, that format is used, but _not_ written to `stream`&period; If `version` is not supported, `stream` is left unmodified&period; (See the package&hyphen;group&hyphen;level documentation for more information on `bdex` streaming of container types)&period;
| xref:BloombergLP/bdlde/Md5/loadDigest.adoc[`loadDigest`] 
| Load the current value of this MD5 digest into the specified `result`&period;
| xref:BloombergLP/bdlde/Md5/loadDigestAndReset.adoc[`loadDigestAndReset`] 
| Load the current value of this MD5 digest into the specified `result` and set the value of this MD5 digest to the value provided by the default constructor&period;
| xref:BloombergLP/bdlde/Md5/print.adoc[`print`] 
| Format the current value of this MD5 digest to the specified output `stream` and return a reference to the modifiable `stream`&period;
| xref:BloombergLP/bdlde/Md5/reset.adoc[`reset`] 
| Reset the value of this MD5 digest to the value provided by the default constructor&period;
| xref:BloombergLP/bdlde/Md5/update.adoc[`update`] 
| Update the value of this MD5 digest to incorporate the specified `data` having the specified `length` in bytes&period; If the current state is the default state, the resultant value of this MD5 digest is the application of the MD5 algorithm upon the currently given `data` of the given `length`&period; If this digest has been previously provided data and has not been subsequently reset, the current state is not the default state and the resultant value is equivalent to applying the MD5 algorithm upon the concatenation of all the provided data&period; The behavior is undefined unless `0 &lt;&equals; length`&period; Note that if `data` is 0, then `length` also must be 0&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/Md5/maxSupportedBdexVersion-00.adoc[`maxSupportedBdexVersion`] 
| `maxSupportedBdexVersion` overloads
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlde/operator_eq-0ea.adoc[BloombergLP::bdlde::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` MD5 digests have the same value, and `false` otherwise&period; Two digests have the same value if the values obtained from their respective `loadDigest` methods are identical&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/operator_not_eq-04.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` MD5 digests do not have the same value, and `false` otherwise&period; Two digests do not have the same value if the values obtained from their respective `loadDigest` methods differ&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
