[#absl-Cord-SetExpectedChecksum]
= xref:absl.adoc[absl]::xref:absl/Cord.adoc[Cord]::SetExpectedChecksum
:relfileprefix: ../../
:mrdocs:

Stores a checksum value with this non&hyphen;empty cord instance, for later retrieval&period;

== Synopsis

Declared in `&lt;absl&sol;strings&sol;cord&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
SetExpectedChecksum(uint32&lowbar;t crc);
----

== Description

The expected checksum is a number stored out&hyphen;of&hyphen;band, alongside the data&period; It is preserved across copies and assignments, but any mutations to a cord will cause it to lose its expected checksum&period;

The expected checksum is not part of a Cord&apos;s value, and does not affect operations such as equality or hashing&period;

This field is intended to store a CRC32C checksum for later validation, to help support end&hyphen;to&hyphen;end checksum workflows&period; However, the Cord API itself does no CRC validation, and assigns no meaning to this number&period;

This call has no effect if this cord is empty&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *crc*
| The checksum value to store with the Cord&period;
|===


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