<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SharedWithYou",
  "identifier" : "/documentation/SharedWithYouCore/SWPerson/Identity",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Shared with You Core",
      "SharedWithYouCore"
    ],
    "preciseIdentifier" : "c:objc(cs)SWPersonIdentity"
  },
  "title" : "SWPerson.Identity"
}
-->

# SWPerson.Identity

The unique identity for a person.

```
class Identity
```

## Overview

This object represents an opaque Merkle tree where the root hash of the tree can uniquely identify the individual using the hash value of all of their devices. The individual’s devices use [`SWPerson.IdentityProof`](/documentation/SharedWithYouCore/SWPerson/IdentityProof) to prove themselves to be part of this identity, and can then be used for cryptographic signatures for that individual.

## Topics

### Creating a hash

[`init(rootHash: Data)`](/documentation/SharedWithYouCore/SWPerson/Identity/init(rootHash:))

Creates and initializes the hash.

### Accessing the hash

[`var rootHash: Data`](/documentation/SharedWithYouCore/SWPerson/Identity/rootHash)

The root hash of the tree that represents the individual’s identity.

### Initializers

[`init?(coder: NSCoder)`](/documentation/SharedWithYouCore/SWPerson/Identity/init(coder:))

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)