aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/codec
Commit message (Collapse)AuthorAgeFilesLines
* Move codec_base.h to internal header in utilsJack Lloyd2018-05-314-170/+3
|
* Refactoring Base32 to use the templated algorithmWambou2018-05-312-182/+146
|
* Define templated base encoding/decodingWambou2018-05-312-0/+167
|
* Implement Base32Wambou2018-05-313-0/+417
|
* Address some bool/int conversion warnings from SonarJack Lloyd2017-10-061-1/+4
| | | | Nothing major but probably good to clean these up.
* Remove redundant parensJack Lloyd2017-10-031-2/+2
| | | | Sonar
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-202-4/+4
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Complete the final annotation changesJack Lloyd2017-09-191-2/+2
|
* Add API stability annotations.Jack Lloyd2017-09-192-16/+16
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-022-2/+6
|
* Remove function comments n*4/3 and n*3/4 in base64Evgeny Pokhilko2017-02-062-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 typesJack Lloyd2016-12-184-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 addsJack Lloyd2015-12-112-2/+2
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-112-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_upSimon Warta2015-07-151-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 Warta2015-06-274-12/+17
|
* Clean up root dir, remove some unneeded dependencieslloyd2015-02-056-508/+0
|
* Clean up base64 handling. Github pull 40 from webmaster128lloyd2015-01-111-11/+10
|
* Ensure all files have copyright and license info.lloyd2015-01-108-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 37lloyd2015-01-081-2/+9
|
* Fix various warnings from VC++ 2014 and add missing includelloyd2014-10-311-2/+2
|
* Move lib into srclloyd2014-01-1012-0/+1234