Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | chunk: Skip all leading zero bytes in chunk_skip_zero() not just the first | Tobias Brunner | 2016-04-04 | 1 | -2/+2 |
| | |||||
* | Use standard unsigned integer types | Andreas Steffen | 2016-03-24 | 1 | -7/+7 |
| | |||||
* | utils: Add a constant time chunk_equals() variant for cryptographic purposes | Martin Willi | 2015-04-14 | 1 | -0/+13 |
| | |||||
* | chunk: Fix Doxygen comments for chunk_internet_checksum[_inc] | Tobias Brunner | 2014-09-11 | 1 | -2/+2 |
| | |||||
* | chunk: Add function to calculate Internet Checksums according to RFC 1071 | Tobias Brunner | 2014-07-22 | 1 | -0/+25 |
| | |||||
* | unit-tests: Seed chunk_hash() only once, but before creating any hashtables | Martin Willi | 2014-06-04 | 1 | -1/+2 |
| | | | | | | | Due to the removal of pthread_once, we manually create the seed for chunk_hash(). With the new testable functions interface, this won't work for the hashtable initiated using __attribute__((constructor)). Enforce seeding before creating that hashtable. | ||||
* | chunk: Don't depend on pthread directly | Martin Willi | 2014-06-04 | 1 | -0/+8 |
| | |||||
* | windows: Add a common Windows header for platform specific wrappers | Martin Willi | 2014-06-03 | 1 | -0/+2 |
| | | | | | Include some more basic system headers in utils.h, so we can use that common header on the different platforms. | ||||
* | chunk: Externalize error reporting in chunk_write() | Martin Willi | 2014-01-23 | 1 | -2/+3 |
| | | | | | This avoids passing that arbitrary label just for error messages, and gives greater flexibility in handling errors. | ||||
* | chunk: Use dynamically allocated buffer in chunk_from_fd() | Martin Willi | 2014-01-23 | 1 | -2/+5 |
| | | | | | | | | When acting on files, we can use fstat() to estimate the buffer size. On non-file FDs, we dynamically increase an allocated buffer. Additionally we slightly change the function signature to properly handle zero-length files and add appropriate unit tests. | ||||
* | chunk: Add functions to map file contents to a chunk | Martin Willi | 2014-01-23 | 1 | -0/+26 |
| | |||||
* | chunk: Fix signedness warnings caused by chunk_from_* macros | Tobias Brunner | 2013-11-27 | 1 | -3/+3 |
| | | | | | | There are countless other such warnings because e.g. chunk_create() is called with char*, but at least we prevent users from causing such warnings inadvertently when using these macros. | ||||
* | chunk: Add helper function to create a chunk from data read from a file ↵ | Tobias Brunner | 2013-10-23 | 1 | -0/+8 |
| | | | | descriptor | ||||
* | chunk: Print chunks without separator if + modifier is used | Tobias Brunner | 2013-08-24 | 1 | -0/+1 |
| | |||||
* | chunk: Add predictable hash function | Tobias Brunner | 2013-06-28 | 1 | -1/+31 |
| | | | | | Since chunk_hash() is randomized its output is not predictable, that is, it is only within the same process. | ||||
* | Use local variable in chunk_from_str() | Tobias Brunner | 2013-06-11 | 1 | -2/+2 |
| | | | | | This allows using strdup() or other string functions as argument without calling them twice. | ||||
* | Replace chunk_hash() with output from chunk_mac() | Tobias Brunner | 2013-06-11 | 1 | -0/+8 |
| | | | | | | | The quality is way better, the calculation is a bit slower though. The key is statically initialized to zero, which will be changed later to prevent hash flooding. | ||||
* | Adding chunk_mac() which calculates a 64-bit MAC using SipHash-2-4 | Tobias Brunner | 2013-06-11 | 1 | -2/+16 |
| | |||||
* | Add a chunk_from_str() initializer that does not include 0-terminator | Martin Willi | 2013-01-15 | 1 | -0/+5 |
| | |||||
* | Moved utils.[ch] to utils folder | Tobias Brunner | 2012-10-24 | 1 | -1/+1 |
| | |||||
* | Moved chunk_t to utils folder | Tobias Brunner | 2012-10-24 | 1 | -0/+318 |