/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
/* Copyright (C) 2009 Trend Micro Inc.
* All right reserved.
*
* This program is a free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
SHA1_Init(&c);
while((n = fread(buf, 1, 2048, fp)) > 0)
{
buf[n] = '\0';
SHA1_Update(&c,buf,(unsigned long)n);
}
SHA1_Init(&c);
while((n = fread(buf, 1, 2048, fp)) > 0)
{
buf[n] = '\0';
SHA1_Update(&c,buf,(unsigned long)n);
}
for (n=0; n<SHA_DIGEST_LENGTH; n++)
{
snprintf(output, 3, "%02x", md[n]);
output+=2;
}
for (n=0; n<SHA_DIGEST_LENGTH; n++)
{
snprintf(output, 3, "%02x", md[n]);
output+=2;
}