pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] [PATCH] Crypt filters


From: David Vazquez
Subject: Re: [pdf-devel] [PATCH] Crypt filters
Date: Mon, 22 Dec 2008 14:46:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Ok jemarch. I have written some examples for libgcrypt and I can do it
works incrementally, but we would change the crypt API. So, I propose
the following changes:

1. Edit crypt module (AESV2 only) in order to it doesn't pad the
   content.

2. Provide a function:

   void pdf_crypt_cipher_pad (CIPHER, OUT, OUT_SIZE, BUFFER, SIZE)

   Pad a buffer in memory. The new buffer is written in OUT.

3. Provide high level functions:

      pdf_status_t pdf_crypt_encrypt_buffer (ALGO, OUT, OUT_SIZE, IN, IN_SIZE);
      pdf_status_t pdf_crypt_decrypt_buffer (ALGO, OUT, OUT_SIZE, IN, IN_SIZE);

   which they work with a buffer in memory (with padding).


In this way, crypt filters only will need to use `pdf_crypt_cipher_pad'
in `finish_p'.


What do you think? If you agree, I write this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]