aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/chunk.h
Commit message (Collapse)AuthorAgeFilesLines
* chunk: Fix Doxygen comments for chunk_internet_checksum[_inc]Tobias Brunner2014-09-111-2/+2
|
* chunk: Add function to calculate Internet Checksums according to RFC 1071Tobias Brunner2014-07-221-0/+25
|
* unit-tests: Seed chunk_hash() only once, but before creating any hashtablesMartin Willi2014-06-041-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 directlyMartin Willi2014-06-041-0/+8
|
* windows: Add a common Windows header for platform specific wrappersMartin Willi2014-06-031-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 Willi2014-01-231-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 Willi2014-01-231-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 chunkMartin Willi2014-01-231-0/+26
|
* chunk: Fix signedness warnings caused by chunk_from_* macrosTobias Brunner2013-11-271-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 Brunner2013-10-231-0/+8
| | | | descriptor
* chunk: Print chunks without separator if + modifier is usedTobias Brunner2013-08-241-0/+1
|
* chunk: Add predictable hash functionTobias Brunner2013-06-281-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 Brunner2013-06-111-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 Brunner2013-06-111-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-4Tobias Brunner2013-06-111-2/+16
|
* Add a chunk_from_str() initializer that does not include 0-terminatorMartin Willi2013-01-151-0/+5
|
* Moved utils.[ch] to utils folderTobias Brunner2012-10-241-1/+1
|
* Moved chunk_t to utils folderTobias Brunner2012-10-241-0/+318