---
title: "hash(into:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/optional/hash(into:)"
---

# hash(into:)

Hashes the essential components of this value by feeding them into the given hasher.

## Declaration

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

## Parameters

- `hasher`: The hasher to use when combining the components of this instance.

## See Also

### Inspecting an Optional

- [unsafelyUnwrapped](swift/optional/unsafelyunwrapped.md)
- [debugDescription](swift/optional/debugdescription.md)
- [customMirror](swift/optional/custommirror.md)
