aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libkeccak/files.c7
-rw-r--r--src/libkeccak/files.h15
2 files changed, 14 insertions, 8 deletions
diff --git a/src/libkeccak/files.c b/src/libkeccak/files.c
index aa71037..46aea61 100644
--- a/src/libkeccak/files.c
+++ b/src/libkeccak/files.c
@@ -26,7 +26,8 @@
/**
- * Calculate a Keccak-family hashsum of a file
+ * Calculate a Keccak-family hashsum of a file,
+ * the content of the file is assumed non-sensitive
*
* @param fd The file descriptor of the file to hash
* @param state The hashing state, should not be initialised (memory leak otherwise)
@@ -59,10 +60,10 @@ int libkeccak_generalised_sum_fd(int fd, libkeccak_state_t* restrict state,
got = read(fd, chunk, blksize);
if (got < 0) return -1;
if (got == 0) break;
- if (libkeccak_update(state, chunk, (size_t)got) < 0)
+ if (libkeccak_fast_update(state, chunk, (size_t)got) < 0)
return -1;
}
- return libkeccak_digest(state, NULL, 0, 0, suffix, hashsum);
+ return libkeccak_fast_digest(state, NULL, 0, 0, suffix, hashsum);
}
diff --git a/src/libkeccak/files.h b/src/libkeccak/files.h
index de63c85..f3279af 100644
--- a/src/libkeccak/files.h
+++ b/src/libkeccak/files.h
@@ -24,7 +24,8 @@
/**
- * Calculate a Keccak-family hashsum of a file
+ * Calculate a Keccak-family hashsum of a file,
+ * the content of the file is assumed non-sensitive
*
* @param fd The file descriptor of the file to hash
* @param state The hashing state, should not be initialised (memory leak otherwise)
@@ -41,7 +42,8 @@ int libkeccak_generalised_sum_fd(int fd, libkeccak_state_t* restrict state,
/**
- * Calculate the Keccak hashsum of a file
+ * Calculate the Keccak hashsum of a file,
+ * the content of the file is assumed non-sensitive
*
* @param fd The file descriptor of the file to hash
* @param state The hashing state, should not be initialised (memory leak otherwise)
@@ -59,7 +61,8 @@ int libkeccak_keccaksum_fd(int fd, libkeccak_state_t* restrict state,
/**
- * Calculate the SHA3 hashsum of a file
+ * Calculate the SHA3 hashsum of a file,
+ * the content of the file is assumed non-sensitive
*
* @param fd The file descriptor of the file to hash
* @param state The hashing state, should not be initialised (memory leak otherwise)
@@ -79,7 +82,8 @@ int libkeccak_sha3sum_fd(int fd, libkeccak_state_t* restrict state,
/**
- * Calculate the RawSHAKE hashsum of a file
+ * Calculate the RawSHAKE hashsum of a file,
+ * the content of the file is assumed non-sensitive
*
* @param fd The file descriptor of the file to hash
* @param state The hashing state, should not be initialised (memory leak otherwise)
@@ -100,7 +104,8 @@ int libkeccak_rawshakesum_fd(int fd, libkeccak_state_t* restrict state,
/**
- * Calculate the SHAKE hashsum of a file
+ * Calculate the SHAKE hashsum of a file,
+ * the content of the file is assumed non-sensitive
*
* @param fd The file descriptor of the file to hash
* @param state The hashing state, should not be initialised (memory leak otherwise)