summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--multihash/__init__.py4
-rw-r--r--src/hash.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/multihash/__init__.py b/multihash/__init__.py
index 9be422f..d31920f 100644
--- a/multihash/__init__.py
+++ b/multihash/__init__.py
@@ -17,8 +17,8 @@ class Multihash:
self.update = h.update
self.first = h
-def hash_file(name, *args):
+def hash_file(name, *algorithms):
f = open(name)
- h = Multihash()
+ h = Multihash(*algorithms)
_hash_file(f.fileno(), h.first)
return h \ No newline at end of file
diff --git a/src/hash.cpp b/src/hash.cpp
index c4adcd4..aa2d573 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -62,9 +62,9 @@ namespace Multihash {
}
void _hash_file(int fileno, Hash* hash) {
- char* buf = new char[32768];
+ char* buf = new char[131072];
int s;
- while((s = read(fileno, buf, 32768)) > 0) {
+ while((s = read(fileno, buf, 131072)) > 0) {
hash->_update(buf, s);
}
delete buf;