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

Safe HaskellNone
LanguageHaskell98

Pdf.Toolbox.Document.Encryption

Description

Basic support for encrypted PDF documents

Synopsis

Documentation

type Decryptor = Ref -> DecryptorScope -> IS -> IO IS Source

Decrypt input stream

defaultUserPassword :: ByteString Source

The default user password

mkStandardDecryptor Source

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

data DecryptorScope Source

Encryption handler may specify different encryption keys for strings and streams