projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix errors when a custom size is given which is larger than the container (#2404).
[dcpomatic.git]
/
src
/
lib
/
digester.h
diff --git
a/src/lib/digester.h
b/src/lib/digester.h
index 92eb5faa3bc6684267b91711339f6e2f3be53b87..e4daabd68d265e5bc3af8acdc590484819a611aa 100644
(file)
--- a/
src/lib/digester.h
+++ b/
src/lib/digester.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2014-20
16
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-20
21
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,17
+18,21
@@
*/
*/
-#include <openssl/md5.h>
-#include <
boost/noncopyable.hpp
>
+
+#include <
nettle/md5.h
>
#include <boost/optional.hpp>
#include <string>
#include <boost/optional.hpp>
#include <string>
-class Digester : public boost::noncopyable
+
+class Digester
{
public:
Digester ();
~Digester ();
{
public:
Digester ();
~Digester ();
+ Digester (Digester const&) = delete;
+ Digester& operator= (Digester const&) = delete;
+
void add (void const * data, size_t size);
template <class T>
void add (void const * data, size_t size);
template <class T>
@@
-40,7
+44,11
@@
public:
std::string get () const;
std::string get () const;
+ void get (uint8_t* buffer) const;
+
+ int size () const;
+
private:
private:
- mutable
MD5_CTX
_context;
+ mutable
md5_ctx
_context;
mutable boost::optional<std::string> _digest;
};
mutable boost::optional<std::string> _digest;
};