<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFDocument/isEncrypted",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFDocument(py)isEncrypted"
  },
  "title" : "isEncrypted"
}
-->

# isEncrypted

A Boolean value specifying whether the document is encrypted.

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the document is encrypted, whether it is locked or unlocked; <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

If encrypted, reading the document requires a password.

Encrypted documents whose password is the empty string are unlocked automatically upon opening, because PDF Kit tries the empty string as a password if none is supplied. Use the [`unlock(withPassword:)`](/documentation/PDFKit/PDFDocument/unlock(withPassword:)) method to unlock a document using a password.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)