pdf-toolbox-document-0.0.3.0: A collection of tools for processing PDF files.

Safe HaskellNone

Pdf.Toolbox.Document.Encryption

Description

Basic support for encrypted PDF documents

Synopsis

Documentation

type Decryptor = Ref -> IS -> IO ISSource

Decrypt input stream

defaultUserPassword :: ByteStringSource

The default user password

mkStandardDecryptorSource

Arguments

:: Monad m 
=> Dict

document trailer

-> Dict

encryption dictionary

-> ByteString

user password (32 bytes exactly, see 7.6.3.3 Encryption Key Algorithm)

-> PdfE m (Maybe Decryptor) 

Standard decryptor. RC4

decryptObject :: (IS -> IO IS) -> Object a -> IO (Object a)Source

Decrypt object with the decryptor