content/commands/digest.md
Get the hash digest for the value stored in the specified key as a hexadecimal string. Keys must be of type string.
A hash digest is a fixed-size numerical representation of a string value, computed using the XXH3 hash algorithm. Redis uses this hash digest for efficient comparison operations without needing to compare the full string content. You can use these hash digests with the [SET]({{< relref "/commands/set" >}}) command's IFDEQ and IFDNE options, and also the [DELEX]({{< relref "/commands/delex" >}}) command's IFDEQ and IFDNE options.
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | <span title="Not supported">❌ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | |
> SET key1 "Hello world"
OK
> DIGEST key1
"b6acb9d84a38ff74"
{{< multitabs id="return-info" tab1="RESP2" tab2="RESP3" >}}
One of the following:
-tab-sep-
One of the following:
{{< /multitabs >}}