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

This class represents a CRC&hyphen;64 checksum value that can be updated as data is provided&period;

== Synopsis

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

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

== 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 objects have the same value can be found in the description of `operator&equals;&equals;` for the class&period;) This class 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 object, 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;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/Crc64/2constructor-01.adoc[`Crc64`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlde/Crc64/operator_assign.adoc[`operator&equals;`] 
| Assign to this checksum the value of the specified `rhs` checksum, and return a reference to this modifiable checksum&period;
| xref:BloombergLP/bdlde/Crc64/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 `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, this object is unaltered and `stream` is invalidated but otherwise unmodified&period; If `version` is supported but `stream` becomes invalid during this operation, this object has an undefined, but valid, state&period; Note that no version is read from `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/bdlde/Crc64/bdexStreamOut.adoc[`bdexStreamOut`] 
| Write this value to the specified output `stream` using the specified `version` format, and return a reference to `stream`&period; If `stream` is initially invalid, this operation has no effect&period; If `version` is not supported, `stream` is invalidated but otherwise unmodified&period; Note that `version` is not written to `stream`&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
| xref:BloombergLP/bdlde/Crc64/checksum.adoc[`checksum`] 
| Return the current value of this checksum&period;
| xref:BloombergLP/bdlde/Crc64/checksumAndReset.adoc[`checksumAndReset`] 
| Return the current value of this checksum and set the value of this checksum to the value the default constructor provides&period;
| xref:BloombergLP/bdlde/Crc64/print.adoc[`print`] 
| Format this object to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period;
| xref:BloombergLP/bdlde/Crc64/reset.adoc[`reset`] 
| Reset the value of this checksum to the value the default constructor provides&period;
| xref:BloombergLP/bdlde/Crc64/update.adoc[`update`] 
| Update the value of this checksum to incorporate the specified `data` having the specified `length`&period; If the current state is the default state, the resultant value of this checksum is the application of the CRC&hyphen;64 algorithm upon the currently given `data` of the given `length`&period; If this checksum 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 CRC&hyphen;64 algorithm upon the concatenation of all the provided data&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/Crc64/maxSupportedBdexVersion.adoc[`maxSupportedBdexVersion`] 
| Return the maximum valid BDEX format version, as indicated by the specified `versionSelector`, to be passed to the `bdexStreamOut` method&period; Note that the `versionSelector` is expected to be formatted as `yyyymmdd`, a date representation&period; See the `bslx` package&hyphen;level documentation for more information on BDEX streaming of value&hyphen;semantic types and containers&period;
|===


== Friends

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

== Non-Member Functions

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


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