From 32937ed3ab5cb51ad175d602d466cbb9dfe917ad Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 30 Jun 2008 04:34:54 +0000 Subject: Remove the free-standing function deref_alias. It only served as a forwarder for the implementation in Library_State. Instead explicitly call deref_alias on global_state() wherever the old freestanding version was used. This serves to make (more) uses of the global state explicit rather than implicit. --- src/def_alg.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/def_alg.cpp') diff --git a/src/def_alg.cpp b/src/def_alg.cpp index d6f6422f5..b10c4ff98 100644 --- a/src/def_alg.cpp +++ b/src/def_alg.cpp @@ -4,7 +4,7 @@ *************************************************/ #include -#include +#include #include #include @@ -113,7 +113,7 @@ Default_Engine::find_block_cipher(const std::string& algo_spec) const std::vector name = parse_algorithm_name(algo_spec); if(name.empty()) return 0; - const std::string algo_name = deref_alias(name[0]); + const std::string algo_name = global_state().deref_alias(name[0]); HANDLE_TYPE_NO_ARGS("AES", AES); HANDLE_TYPE_NO_ARGS("AES-128", AES_128); @@ -161,7 +161,7 @@ Default_Engine::find_stream_cipher(const std::string& algo_spec) const std::vector name = parse_algorithm_name(algo_spec); if(name.empty()) return 0; - const std::string algo_name = deref_alias(name[0]); + const std::string algo_name = global_state().deref_alias(name[0]); HANDLE_TYPE_ONE_U32BIT("ARC4", ARC4, 0); HANDLE_TYPE_ONE_U32BIT("RC4_drop", ARC4, 768); @@ -180,7 +180,7 @@ Default_Engine::find_hash(const std::string& algo_spec) const std::vector name = parse_algorithm_name(algo_spec); if(name.empty()) return 0; - const std::string algo_name = deref_alias(name[0]); + const std::string algo_name = global_state().deref_alias(name[0]); HANDLE_TYPE_NO_ARGS("Adler32", Adler32); HANDLE_TYPE_NO_ARGS("CRC24", CRC24); @@ -218,7 +218,7 @@ Default_Engine::find_mac(const std::string& algo_spec) const std::vector name = parse_algorithm_name(algo_spec); if(name.empty()) return 0; - const std::string algo_name = deref_alias(name[0]); + const std::string algo_name = global_state().deref_alias(name[0]); HANDLE_TYPE_ONE_STRING("CBC-MAC", CBC_MAC); HANDLE_TYPE_ONE_STRING("CMAC", CMAC); @@ -237,7 +237,7 @@ S2K* Default_Engine::find_s2k(const std::string& algo_spec) const if(name.empty()) return 0; - const std::string algo_name = deref_alias(name[0]); + const std::string algo_name = global_state().deref_alias(name[0]); HANDLE_TYPE_ONE_STRING("PBKDF1", PKCS5_PBKDF1); HANDLE_TYPE_ONE_STRING("PBKDF2", PKCS5_PBKDF2); @@ -256,7 +256,7 @@ Default_Engine::find_bc_pad(const std::string& algo_spec) const if(name.empty()) return 0; - const std::string algo_name = deref_alias(name[0]); + const std::string algo_name = global_state().deref_alias(name[0]); HANDLE_TYPE_NO_ARGS("PKCS7", PKCS7_Padding); HANDLE_TYPE_NO_ARGS("OneAndZeros", OneAndZeros_Padding); -- cgit v1.2.3