---
title: "private(mask:)"
framework: os
role: symbol
role_heading: Type Method
path: "os/oslogprivacy/private(mask:)"
---

# private(mask:)

Returns a privacy structure that marks an interpolated value as private, and customizes the display of redacted values.

## Declaration

```swift
static func `private`(mask: OSLogPrivacy.Mask) -> OSLogPrivacy
```

## Parameters

- `mask`: A mask that determines whether the system replaces a redacted value with a generic string or a string from a hash of the redacted value.

## Return Value

Return Value A privacy object that redacts a value.

## See Also

### Creating a Custom Privacy Mask

- [auto(mask:)](os/oslogprivacy/auto(mask:).md)
- [sensitive(mask:)](os/oslogprivacy/sensitive(mask:).md)
- [OSLogPrivacy.Mask](os/oslogprivacy/mask.md)
