summaryrefslogtreecommitdiff
path: root/src/pkl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkl.cc')
-rw-r--r--src/pkl.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pkl.cc b/src/pkl.cc
index 236313aa..a46ab313 100644
--- a/src/pkl.cc
+++ b/src/pkl.cc
@@ -35,6 +35,7 @@
#include "exceptions.h"
#include "util.h"
#include "raw_convert.h"
+#include "dcp_assert.h"
#include <libxml++/libxml++.h>
#include <boost/foreach.hpp>
@@ -112,3 +113,15 @@ PKL::write (boost::filesystem::path file, shared_ptr<const CertificateChain> sig
doc.write_to_file (file.string(), "UTF-8");
}
+
+string
+PKL::hash (string id) const
+{
+ BOOST_FOREACH (shared_ptr<Asset> i, _asset_list) {
+ if (i->id() == id) {
+ return i->hash;
+ }
+ }
+
+ DCP_ASSERT (false);
+}