summaryrefslogtreecommitdiffstats
path: root/crypto/secure_hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/secure_hash.h')
-rw-r--r--crypto/secure_hash.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/crypto/secure_hash.h b/crypto/secure_hash.h
index 491a299a3..a5590e5 100644
--- a/crypto/secure_hash.h
+++ b/crypto/secure_hash.h
@@ -10,11 +10,6 @@
#include "base/macros.h"
#include "crypto/crypto_export.h"
-namespace base {
-class Pickle;
-class PickleIterator;
-}
-
namespace crypto {
// A wrapper to calculate secure hashes incrementally, allowing to
@@ -30,17 +25,12 @@ class CRYPTO_EXPORT SecureHash {
virtual void Update(const void* input, size_t len) = 0;
virtual void Finish(void* output, size_t len) = 0;
+ virtual size_t GetHashLength() const = 0;
- // Serialize the context, so it can be restored at a later time.
- // |pickle| will contain the serialized data.
- // Returns whether or not |pickle| was filled.
- virtual bool Serialize(base::Pickle* pickle) = 0;
-
- // Restore the context that was saved earlier.
- // |data_iterator| allows this to be used as part of a larger pickle.
- // |pickle| holds the saved data.
- // Returns success or failure.
- virtual bool Deserialize(base::PickleIterator* data_iterator) = 0;
+ // Create a clone of this SecureHash. The returned clone and this both
+ // represent the same hash state. But from this point on, calling
+ // Update()/Finish() on either doesn't affect the state of the other.
+ virtual SecureHash* Clone() const = 0;
protected:
SecureHash() {}