---
title: password
framework: applearchive
role: symbol
role_heading: Instance Property
path: applearchive/archiveencryptioncontext/password
---

# password

The password used to encrypt or decrypt an archive.

## Declaration

```swift
var password: String? { get set }
```

## Discussion

Discussion Use the generatePassword() function to generate random high entropy passwords.

## See Also

### Setting a password

- [generatePassword()](applearchive/archiveencryptioncontext/generatepassword().md)
- [setPassword(_:)](applearchive/archiveencryptioncontext/setpassword(_:).md)
