Index: crypto/secure_hash.h |
diff --git a/crypto/secure_hash.h b/crypto/secure_hash.h |
index 8a0f6ae66e1ea7f4edea01120ab42e70e73add1a..4a49380334d5c182679d6c1355036e2609283a2b 100644 |
--- a/crypto/secure_hash.h |
+++ b/crypto/secure_hash.h |
@@ -9,6 +9,8 @@ |
#include "base/basictypes.h" |
#include "crypto/crypto_export.h" |
+class Pickle; |
+ |
namespace crypto { |
// A wrapper to calculate secure hashes incrementally, allowing to |
@@ -25,6 +27,17 @@ class CRYPTO_EXPORT SecureHash { |
virtual void Update(const void* input, size_t len) = 0; |
virtual void Finish(void* output, size_t len) = 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(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(void** data_iterator, Pickle* pickle) = 0; |
+ |
protected: |
SecureHash() {} |