<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/EntityIdentifier/hash(into:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents16EntityIdentifierV4hash4intoys6HasherVz_tF"
  },
  "title" : "hash(into:)"
}
-->

# hash(into:)

Hashes the entity identifier.

```
func hash(into hasher: inout Hasher)
```

## Discussion> Important: This implementation **intentionally ignores** the `stableIdentifier` field.
> Only `typeIdentifier` and `identifier` are used for hashing.
> 
> This ensures that the same entity on different devices (same local ID, different stable ID)
> has the same hash, enabling correct behavior in `Set` and `Dictionary`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)