Using libgcrypt on large files
Moritz Schulte
mo at g10code.com
Thu Feb 24 06:37:56 CET 2005
On Wed, Feb 23, 2005 at 10:41:20PM +0100, Ralf H wrote:
> 2) What can I do if the file is really large and will not fit into
> memory? My approach will obviously fail, as I need everything in
> 'data' :(. Is there a way to hash a file in little portions, so I can
> read in buffers and update my signatures in a loop?
No, no: *hash* your file; with gcry_md_*() functions. And then, sign
the *hash value* (optionally with pkcs1) - not the file data itself.
Have a look at the Libgcrypt manual,
Thanks,
Moritz.
--
Moritz Schulte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 193 bytes
Desc: not available
Url : /pipermail/attachments/20050224/246fc5a1/attachment.pgp
More information about the Gcrypt-devel
mailing list