1
// -*- mode: cpp; mode: fold -*-
3
// $Id: hashes.cc,v 1.1 2001/03/06 07:15:29 jgg Exp $
4
/* ######################################################################
6
Hashes - Simple wrapper around the hash functions
8
This is just used to make building the methods simpler, this is the
9
only interface required..
11
##################################################################### */
13
// Include Files /*{{{*/
15
#pragma implementation "apt-pkg/hashes.h"
18
#include <apt-pkg/hashes.h>
24
// Hashes::AddFD - Add the contents of the FD /*{{{*/
25
// ---------------------------------------------------------------------
27
bool Hashes::AddFD(int Fd,unsigned long Size)
29
unsigned char Buf[64*64];
33
Res = read(Fd,Buf,MIN(Size,sizeof(Buf)));
34
if (Res < 0 || (unsigned)Res != MIN(Size,sizeof(Buf)))