From 8798ddc04b5cfe78180ca119f12486df0afb1bd0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 29 Aug 2009 16:19:50 +0200 Subject: =?UTF-8?q?AuthProviderFile:=20Auslesen=20von=20gehashten=20Passw?= =?UTF-8?q?=C3=B6rtern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Hash.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Common') diff --git a/src/Common/Hash.h b/src/Common/Hash.h index 06562e2..db581b7 100644 --- a/src/Common/Hash.h +++ b/src/Common/Hash.h @@ -28,6 +28,7 @@ #include #include +#include #include namespace Mad { @@ -43,7 +44,7 @@ class MAD_COMMON_EXPORT Hash { std::vector list; void addHash(const std::string &name, unsigned id) { - map.insert(std::make_pair(name, id)); + map.insert(std::make_pair(boost::algorithm::to_lower_copy(name), id)); list.push_back(name); } @@ -67,13 +68,13 @@ class MAD_COMMON_EXPORT Hash { } static bool isHashSupported(const std::string &method) { - return (hashes.getMap().find(method) != hashes.getMap().end()); + return (hashes.getMap().find(boost::algorithm::to_lower_copy(method)) != hashes.getMap().end()); } static std::vector hash(const std::vector &in, unsigned int method) throw (Core::Exception); static std::vector hash(const std::vector &in, const std::string &method) throw (Core::Exception) { - std::map::const_iterator methodIt = hashes.getMap().find(method); + std::map::const_iterator methodIt = hashes.getMap().find(boost::algorithm::to_lower_copy(method)); if(methodIt == hashes.getMap().end()) throw(Core::Exception(Core::Exception::NOT_IMPLEMENTED)); -- cgit v1.2.3