Encryption
-
This class allows a transparent decryption of AES256 encrypted files using the RNCryptor file format https://github.com/RNCryptor/RNCryptor-Spec/blob/master/RNCryptor-Spec-v3.md
Legacy PSPDFKit old file format is also supported. Use the provided encryption tool to prepare your documents.
Ensure your passphrase/salt are also protected within the binary, or at least obfuscated. Encryption marginally slows down rendering, since everything is decrypted on the fly.
If saving annotations to a file managed by a
PSPDFAESCryptoDataProvider
, the whole file will be re-written.Note
The initializers will return nil if the strong encryption feature is not enabled, or if you pass an invalid parameter configuration.Declaration
Objective-C
@interface PSPDFAESCryptoDataProvider : NSObject <PSPDFFileDataProviding>
Swift
class AESCryptoDataProvider : NSObject, FileDataProviding
-
The data sink that works with
See morePSPDFAESCryptoDataProvider
Declaration
Objective-C
@interface PSPDFAESCryptoDataSink : NSObject <PSPDFDataSink>
Swift
class AESCryptoDataSink : NSObject, DataSink
-
AES encryption, RNCryptor data format (see https://github.com/RNCryptor/RNCryptor-Spec/blob/master/RNCryptor-Spec-v3.md )
See moreDeclaration
Objective-C
@interface PSPDFAESCryptoInputStream : PSPDFCryptoInputStream
Swift
class AESCryptoInputStream : CryptoInputStream
-
AES decryption, RNCryptor data format (see https://github.com/RNCryptor/RNCryptor-Spec/blob/master/RNCryptor-Spec-v3.md )
See moreDeclaration
Objective-C
@interface PSPDFAESCryptoOutputStream : PSPDFCryptoOutputStream
Swift
class AESCryptoOutputStream : CryptoOutputStream
-
Encryption input stream.
See moreDeclaration
Objective-C
@interface PSPDFCryptoInputStream : NSInputStream
Swift
class CryptoInputStream : InputStream
-
Encryption output stream.
See moreDeclaration
Objective-C
@interface PSPDFCryptoOutputStream : NSOutputStream
Swift
class CryptoOutputStream : OutputStream
-
Simple class that encrypts/decrypts files in a format compatible to
See morePSPDFAESCryptoDataProvider
.Declaration
Objective-C
@interface PSPDFCryptor : NSObject
Swift
class Cryptor : NSObject