aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/sph
AgeCommit message (Collapse)Author
2022-04-09Remove accidentally committed fileJay Berkenbilt
2022-04-09Add documentation for code formatting and contribution guidelinesJay Berkenbilt
2022-04-03Exclude formatting on embedded native cryptoJay Berkenbilt
2022-02-08WHITESPACE ONLY -- expand tabs in source codeJay Berkenbilt
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.
2019-09-18Fix integer type warnings for big-endian systemsJay Berkenbilt
2019-06-21Fix sign and conversion warnings (major)Jay Berkenbilt
This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with MSVC. This significantly reduces the likelihood of potential crashes from bogus integer values. There are some parts of the code that take int when they should take size_t or an offset. Such places would make qpdf not support files with more than 2^31 of something that usually wouldn't be so large. In the event that such a file shows up and is valid, at least qpdf would raise an error in the right spot so the issue could be legitimately addressed rather than failing in some weird way because of a silent overflow condition.
2018-08-12Protect headers with compliant identifiers (fixes #233)Jay Berkenbilt
2017-08-22Fix compiler warnings for clang/mac OS XJay Berkenbilt
2012-12-31SHA2 pipeline with support for 256, 384, and 512 bitsJay Berkenbilt
Implemented pipeline around sph sha calls using standard test vectors for full-byte values. Did not test or support partial byte values.
2012-12-31Incorporate sha2 code from sphlib 3.0Jay Berkenbilt
Changes from upstream are limited to change #include paths so that I can place header files and included "c" files in a subdirectory. I didn't keep the unit tests from sphlib but instead verified them by running them manually. I will implement the same tests using the Pl_SHA2 pipeline except that sphlib's sha2 implementation supports partial bytes, which I will not exercise in qpdf or our tests.