[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/lib/tiger.c
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/lib/tiger.c |
Date: |
Sun, 28 Aug 2005 06:47:47 -0400 |
Index: mldonkey/src/utils/lib/tiger.c
diff -u mldonkey/src/utils/lib/tiger.c:1.6 mldonkey/src/utils/lib/tiger.c:1.7
--- mldonkey/src/utils/lib/tiger.c:1.6 Fri Apr 16 17:14:56 2004
+++ mldonkey/src/utils/lib/tiger.c Sun Aug 28 10:47:39 2005
@@ -779,7 +779,7 @@
#define MAX_TIGER_CHUNK_SIZE 1024
static word64 tiger_buffer[MAX_TIGER_CHUNK_SIZE];
-void tiger_hash(char prefix, char *s, int len, unsigned char *digest)
+void tiger_hash(char prefix, char *s, long len, unsigned char *digest)
{
char *buffer = (char*) tiger_buffer;
word64 ndigest[3];
@@ -794,10 +794,10 @@
swap_digest(digest);
}
-void tiger_tree_string(char *s, int len, int pos, int block_size, char *digest)
+void tiger_tree_string(char *s, size_t len, size_t pos, size_t block_size,
char *digest)
{
if(block_size == BLOCK_SIZE){
- int length = (len - pos > BLOCK_SIZE) ? BLOCK_SIZE : len - pos;
+ size_t length = (len - pos > BLOCK_SIZE) ? BLOCK_SIZE : len - pos;
tiger_hash(0, s+pos, length, digest);
} else {
if(pos+block_size/2 >=len){
@@ -827,9 +827,9 @@
#include "caml/fail.h"
#include "caml/alloc.h"
-int tiger_block_size(int len)
+long tiger_block_size(long len)
{
- int block_size = BLOCK_SIZE;
+ long block_size = BLOCK_SIZE;
while(block_size < len) block_size *= 2;
return block_size;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mldonkey-commits] Changes to mldonkey/src/utils/lib/tiger.c,
mldonkey-commits <=