aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/sha1.cc
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2011-10-06 22:26:59 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2011-10-14 23:04:28 +0100
commit2ff049ddef190325fac1a1933c71a5884a64478f (patch)
treef32afec227387039801dc275299a2efa4f04e4dd /paludis/util/sha1.cc
parent1053487ae4134de9e3067f2e17a453332b4aa49c (diff)
downloadpaludis-2ff049ddef190325fac1a1933c71a5884a64478f.tar.gz
paludis-2ff049ddef190325fac1a1933c71a5884a64478f.tar.xz
Add DigestRegistry
This allows a digest function to be computed given its name, rather than hard-coding the specific digest class.
Diffstat (limited to 'paludis/util/sha1.cc')
-rw-r--r--paludis/util/sha1.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/util/sha1.cc b/paludis/util/sha1.cc
index fc2b54f70..70920174f 100644
--- a/paludis/util/sha1.cc
+++ b/paludis/util/sha1.cc
@@ -21,6 +21,7 @@
#include <paludis/util/sha1.hh>
#include <paludis/util/byte_swap.hh>
+#include <paludis/util/digest_registry.hh>
#include <sstream>
#include <istream>
#include <iomanip>
@@ -209,3 +210,8 @@ SHA1::hexsum() const
return result.str();
}
+namespace
+{
+ DigestRegistry::Registration<SHA1> registration("SHA1");
+}
+