---
title: isEncrypted
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgpdfdocument/isencrypted
---

# isEncrypted

Returns whether the specified PDF file is encrypted.

## Declaration

```swift
var isEncrypted: Bool { get }
```

## Discussion

Discussion If the document is encrypted, a password must be supplied before certain operations are enabled. For more information, see unlockWithPassword(_:).

## See Also

### Working with an Encrypted PDF Document

- [allowsCopying](coregraphics/cgpdfdocument/allowscopying.md)
- [allowsPrinting](coregraphics/cgpdfdocument/allowsprinting.md)
- [isUnlocked](coregraphics/cgpdfdocument/isunlocked.md)
- [unlockWithPassword(_:)](coregraphics/cgpdfdocument/unlockwithpassword(_:).md)
