Extract simple_digest().
[dcpomatic.git] / src / lib / util.cc
index c165a5129bae42bfe646b772d56d246a7102935f..64fdd6a37ee24641ff44fe392af536a44e452e37 100644 (file)
@@ -529,6 +529,14 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size)
        return digester.get ();
 }
 
+
+string
+simple_digest (vector<boost::filesystem::path> paths)
+{
+       return digest_head_tail(paths, 1000000) + raw_convert<string>(boost::filesystem::file_size(paths.front()));
+}
+
+
 /** Round a number up to the nearest multiple of another number.
  *  @param c Index.
  *  @param stride Array of numbers to round, indexed by c.