---
title: stateHash
framework: Local Authentication
role: symbol
role_heading: Instance Property
platforms: [iOS 18.0+, iPadOS 18.0+, Mac Catalyst 18.0+, macOS 15.0+, visionOS 2.0+, watchOS 11.0+]
path: localauthentication/laenvironment/mechanismcompanion/statehash
---

# stateHash

## Declaration

```swift
var stateHash: Data? { get }
```

## Discussion

Discussion Hash of the current companion pairing as returned by @c LAContext.domainState.companion.stateHash(for:) If no companion are paired for this companion type, @c stateHash property is @c nil. If at least one companion is paired for this companion type, @c stateHash is not @c nil and it changes whenever the set of paired companions of this type is changed.
