PSPDFCryptoOutputStream

Objective-C

@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

Swift

class CryptoOutputStream : OutputStream

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 (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 }