---
title: "init(address:method:)"
framework: wifiinfrastructure
role: symbol
role_heading: Initializer
path: "wifiinfrastructure/wimacaddress/hash/init(address:method:)"
---

# init(address:method:)

Creates a new Hash from the given MAC Address, using a randomly-generated salt.

## Declaration

```swift
init?(address: WIMACAddress, method: WIMACAddress.Hash.Method = .sha256)
```

## Parameters

- `address`: The MAC Address to hash.
- `method`: The method to use to generate the hash. Defaults to .sha256.
