aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/codec/base64
Commit message (Collapse)AuthorAgeFilesLines
* Simplify base32/base64 by moving common logic to code_base.hJack Lloyd2018-10-151-35/+8
|
* Remove support for Visual C++ 2013Jack Lloyd2018-10-011-8/+8
| | | | Closes GH #1557
* Fix some Doxygen warningsJack Lloyd2018-08-151-2/+2
|
* Add some final annotationsJack Lloyd2018-08-131-1/+1
|
* Use codec_base for Base64 encodingWambou2018-08-042-158/+153
|
* Remove redundant parensJack Lloyd2017-10-031-2/+2
| | | | Sonar
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-201-2/+2
| | | | | | 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-191-7/+7
| | | | | 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-021-1/+3
|
* 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-182-24/+24
| | | | | | 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-111-1/+1
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-2/+2
| | | | | | | | 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-272-5/+10
|
* Clean up base64 handling. Github pull 40 from webmaster128lloyd2015-01-111-11/+10
|
* Ensure all files have copyright and license info.lloyd2015-01-102-2/+2
| | | | | 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-103-0/+373