PSPDFCryptoOutputStream

@interface PSPDFCryptoOutputStream : NSOutputStream

/// Returns nil if the encryption feature is not enabled.
- (nullable instancetype)initWithOutputStream:(NSOutputStream *)stream encryptionBlock:(NSData * (^)(PSPDFCryptoOutputStream *stream, const uint8_t *buffer, NSUInteger len))encryptionBlock;

/// 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.
@property (nonatomic, copy) NSData * (^encryptionBlock)(PSPDFCryptoOutputStream *stream, const uint8_t *buffer, NSUInteger len);

@end

Undocumented

  • 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 (PSPDFCryptoOutputStream, 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 (readwrite, copy, nonatomic) NSData *_Nonnull (^_Nonnull)
        (PSPDFCryptoOutputStream *_Nonnull, const uint8_t *_Nonnull, NSUInteger)
            encryptionBlock;

    Swift

    var encryptionBlock: (PSPDFCryptoOutputStream, UnsafePointer<UInt8>, UInt) -> Data { get set }