Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove "Dirty hack" for multiple defines in lex_me_harder() | Simon Warta | 2017-04-02 | 2 | -2/+6 |
| | |||||
* | Remove function comments n*4/3 and n*3/4 in base64 | Evgeny Pokhilko | 2017-02-06 | 2 | -6/+29 |
| | | | | | | | The parameter comments were misleading because they did not take into account that input_length must be rounded up to a multiple of 3 and 4 for encode and decode respectively. Two new functions were added to calculate the correct maximum output length. | ||||
* | Convert to using standard uintN_t integer types | Jack Lloyd | 2016-12-18 | 4 | -53/+53 |
| | | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them. | ||||
* | Missing adds | Jack Lloyd | 2015-12-11 | 2 | -2/+2 |
| | |||||
* | Reroot the exception hierarchy into a toplevel Exception class | Jack Lloyd | 2015-12-11 | 2 | -4/+4 |
| | | | | | | | | As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43 | ||||
* | Fix round_up | Simon Warta | 2015-07-15 | 1 | -7/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. src/lib/codec/base64/base64.cpp: : (round_up<size_t>(input_length, 3) / 3) * 4; 2. src/lib/codec/base64/base64.cpp: : (round_up<size_t>(input_length, 4) * 3) / 4; 3. src/lib/filters/transform_filter.cpp: return round_up(target_size, update_granularity); 4. src/lib/math/bigint/bigint.cpp: m_reg.resize(round_up<size_t>(size, 8)); 5. src/lib/math/bigint/bigint.cpp: m_reg.resize(round_up<size_t>((length / WORD_BYTES) + 1, 8)); 6. src/lib/math/numbertheory/mp_numth.cpp: BigInt z(BigInt::Positive, round_up<size_t>(2*x_sw, 16)); 7. src/lib/modes/cbc/cbc.cpp: return round_up(input_length, cipher().block_size()); 8. src/lib/modes/ecb/ecb.cpp: return round_up(input_length, cipher().block_size()); 9. src/lib/modes/xts/xts.cpp: return round_up(input_length, cipher().block_size()); 10. src/lib/pbkdf/pbkdf2/pbkdf2.cpp: const size_t blocks_needed = round_up(out_len, prf_sz) / prf_sz; 11. src/lib/tls/tls_record.cpp: const size_t buf_size = round_up( 12. src/lib/utils/rounding.h:inline T round_up(T n, T align_to) 1. Reason for change 2. Reason for change 3. first argument cannot be 0 (`target_size = 1024`) 4. Is a bug in the current implementation iff `size = 0` 5. first argument cannot be 0 6. round_up should return 0 if `x_sw = 0` 7. ? 8. ? 9. ? 10. first argument cannot be 0 (`if(out_len == 0) return 0;`) 11. first argument is unlikely to be 0 (`iv_size + msg_length + mac_size + (block_size ? 1 : 0)`) 12. Implementation | ||||
* | lib/codec: Convert &vec[0] to vec.data() | Simon Warta | 2015-06-27 | 4 | -12/+17 |
| | |||||
* | Clean up root dir, remove some unneeded dependencies | lloyd | 2015-02-05 | 6 | -508/+0 |
| | |||||
* | Clean up base64 handling. Github pull 40 from webmaster128 | lloyd | 2015-01-11 | 1 | -11/+10 |
| | |||||
* | Ensure all files have copyright and license info. | lloyd | 2015-01-10 | 8 | -8/+8 |
| | | | | | Update license header line to specify the terms and refer to the file, neither of which it included before. | ||||
* | Handle zero length inputs correctly in base64. Github issue 37 | lloyd | 2015-01-08 | 1 | -2/+9 |
| | |||||
* | Fix various warnings from VC++ 2014 and add missing include | lloyd | 2014-10-31 | 1 | -2/+2 |
| | |||||
* | Move lib into src | lloyd | 2014-01-10 | 12 | -0/+1234 |