<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LocalAuthentication",
  "identifier" : "/documentation/LocalAuthentication/LADomainStateCompanion/stateHash(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Local Authentication"
    ],
    "preciseIdentifier" : "c:objc(cs)LADomainStateCompanion(im)stateHashForCompanionType:"
  },
  "title" : "stateHash(for:)"
}
-->

# stateHash(for:)

Returns state hash data for the given companion type.

```
func stateHash(for companionType: LACompanionType) -> Data?
```

## Parameters

`companionType`

The companion type for which state hash data should be returned.

## Discussion\discussion If database of paired devices of the given type was modified state hash
data will change. Nature of such database changes cannot be determined
but comparing data of state hash after different policy evaluation
will reveal the fact database was changed between calls.

---

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)