---
title: "CompositeKeyHashCode"
description: "The return type of [currentCompositeKeyHashCode]. On most platforms this is a [Long] but may be a
different type if the platform target does not support [Long] efficiently (such as JavaScript).

A `CompositeKeyHashCode` is a hash that correlates to a location in a Composition. Hashes are
stable, meaning that if the same composition hierarchy is recomposed or recreated, it will have
the same hashes. Hashes are very likely, but not guaranteed, to be unique.

If you need to convert this value to an Int, it is strongly recommended to use [hashCode] instead
of [toInt][Number.toInt]. Truncating this value instead of hashing it can greatly impact a
value's effectiveness as a hash."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
public expect class CompositeKeyHashCode
```


The return type of `currentCompositeKeyHashCode`. On most platforms this is a `Long` but may be a
different type if the platform target does not support `Long` efficiently (such as JavaScript).

A `CompositeKeyHashCode` is a hash that correlates to a location in a Composition. Hashes are
stable, meaning that if the same composition hierarchy is recomposed or recreated, it will have
the same hashes. Hashes are very likely, but not guaranteed, to be unique.

If you need to convert this value to an Int, it is strongly recommended to use `hashCode` instead
of `toInt`. Truncating this value instead of hashing it can greatly impact a
value's effectiveness as a hash.



