---
title: kCGPDFContextEncryptionKeyLength
framework: coregraphics
role: symbol
role_heading: Global Variable
path: coregraphics/kcgpdfcontextencryptionkeylength
---

# kCGPDFContextEncryptionKeyLength

## Declaration

```swift
let kCGPDFContextEncryptionKeyLength: CFString
```

## Discussion

Discussion The encryption key length in bits; see Table 3.18 “Entries  common to all encryption dictionaries”, PDF Reference: Adobe PDF version 1.5 (4th ed.) for more information. Optional; if present, the value of this key  must be a CFNumber object with value which is a multiple of 8 between 40 and  128, inclusive. If this key is absent or invalid, the encryption key  length defaults to 40 bits.

## See Also

### Metadata Keys

- [kCGPDFContextAuthor](coregraphics/kcgpdfcontextauthor.md)
- [kCGPDFContextCreator](coregraphics/kcgpdfcontextcreator.md)
- [kCGPDFContextTitle](coregraphics/kcgpdfcontexttitle.md)
- [kCGPDFContextOwnerPassword](coregraphics/kcgpdfcontextownerpassword.md)
- [kCGPDFContextUserPassword](coregraphics/kcgpdfcontextuserpassword.md)
- [kCGPDFContextAllowsPrinting](coregraphics/kcgpdfcontextallowsprinting.md)
- [kCGPDFContextAllowsCopying](coregraphics/kcgpdfcontextallowscopying.md)
- [kCGPDFContextOutputIntent](coregraphics/kcgpdfcontextoutputintent.md)
- [kCGPDFContextOutputIntents](coregraphics/kcgpdfcontextoutputintents.md)
- [kCGPDFContextSubject](coregraphics/kcgpdfcontextsubject.md)
- [kCGPDFContextKeywords](coregraphics/kcgpdfcontextkeywords.md)
