---
title: hash
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmaptablekeycallbacks/hash
---

# hash

Points to the function which must produce hash code for key elements of the map table. If NULL, the pointer value is used as the hash code. Second parameter is the element for which hash code should be produced.

## Declaration

```swift
var hash: ((NSMapTable<AnyObject, AnyObject>, UnsafeRawPointer) -> Int)?
```
