PSPDFCryptoOutputStream
Objective-C
@interface PSPDFCryptoOutputStream : NSOutputStream
Swift
class CryptoOutputStream : OutputStream
Encryption output stream.
-
Returns nil if the encryption feature is not enabled.
Declaration
Objective-C
- (nullable instancetype) initWithOutputStream:(nonnull NSOutputStream *)stream encryptionBlock: (nonnull NSData *_Nonnull (^)(PSPDFCryptoOutputStream *_Nonnull, const uint8_t *_Nonnull, NSUInteger))encryptionBlock;
Swift
init?(outputStream stream: OutputStream, encryptionBlock: @escaping (CryptoOutputStream, UnsafePointer<UInt8>, UInt) -> Data)
-
Set the encryption handler. If no encryption block is called, this output stream will simply pass the data through.
Note
Set this property before the output stream is being used.Declaration
Objective-C
@property (nonatomic, copy) NSData *_Nonnull (^_Nonnull) (PSPDFCryptoOutputStream *_Nonnull, const uint8_t *_Nonnull, NSUInteger) encryptionBlock;
Swift
var encryptionBlock: (CryptoOutputStream, UnsafePointer<UInt8>, UInt) -> Data { get set }