aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/lookup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Define lookup.{h,cpp} in terms of Algorithm_Factory. Inline a lot of simplelloyd2009-12-261-144/+35
| | | | functions into the header.
* Oops, I was overzealouslloyd2009-12-231-2/+2
|
* Avoid MSVC warning 4800 about implicit conversion from T to bool. Mostlylloyd2009-12-231-4/+4
| | | | because it makes the code slightly more explicit.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-301-4/+6
| | | | | | | | | | | | | | | up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
* Add an Algorithm_Factory& argument to Engine::get_cipher to avoid alloyd2008-11-231-2/+4
| | | | dependency on libstate.h
* Library_State had two functions that did the same thing,lloyd2008-11-121-41/+47
| | | | | | | | | | | | | | | algo_factory and algorithm_factory. This is confusing so for consistency/simplicity, remove algo_factory, making algorithm_factory the function to call. In 1.7.14, several functions in lookup.h, including retrieve_block_cipher, retrieve_hash, etc were changed to accept a Library_State& reference. However it turns out with the modified design I've settled upon for 1.8 that it is not necessary to change those interfaces; instead they always refer to the global_state algorithm factory which is exactly the semantics one would expect/desire 99% of the time (and is source compatible with code written for 1.6, also a plus)
* Drop look_add.h and the freestanding add_algorithm functionslloyd2008-11-111-33/+0
|
* Move block and stream ciphers also into Algorithm_Factorylloyd2008-11-101-158/+112
|
* Move MACs also to Algorithm_Factorylloyd2008-11-101-57/+34
|
* Move add_algorithm for hashes also to Algorithm_Factorylloyd2008-11-101-19/+8
|
* Have Algorithm_Factory::make_hash_function throw an exception if it can'tlloyd2008-11-101-7/+1
| | | | | | find an object to clone. Add a new constructor to Hash_Filter taking a HashFunction*
* Use Algorithm_Factory and SCAN_Name for all hash lookups. Modify engineslloyd2008-11-101-39/+31
| | | | accordingly.
* Add a class Algorithm_Factory which encapsulates the Engine classes (andlloyd2008-11-101-9/+10
| | | | which will eventually encapsulate the lookup logic as well)
* Remove support for block cipher padding methods in engine. Like S2K,lloyd2008-11-101-51/+0
| | | | | | | | | | they were not used at all outside of the core library implementations. One change is that now get_bc_pad returns a new object, instead of a pointer to a const shared padding method. This does imply a bit more dynamic memory overhead, but the modes are pretty light (stateless, for the most part), so this doesn't seem like a big deal. So modify ECB and CBC classes to add destructors to delete the padding object.
* Remove support for S2K in Engines. There are only three implementations oflloyd2008-11-101-29/+0
| | | | | | an S2K in Botan, all in the core library, and it's relatively unlikely that that many more will be added. get_s2k still exists and performs a direct search across the possibilities.
* Move some lookup related code from src/engine to src/libstate/lookup.cpplloyd2008-11-091-0/+253
|
* Move libstate and selftest out of core/ dir to toplevellloyd2008-10-261-0/+239