Chromium Code Reviews| Index: crypto/secure_hash.h |
| diff --git a/crypto/secure_hash.h b/crypto/secure_hash.h |
| index 8a0f6ae66e1ea7f4edea01120ab42e70e73add1a..bff6600535850369c9a932c82be53a17b13200ce 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,16 @@ 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. |
|
Randy Smith (Not in Mondays)
2011/11/18 19:01:47
Maybe worthwhile indicating that it will wipe out
ahendrickson
2011/11/18 19:47:00
I don't believe that we can currently have both NS
|
| + // |pickle| holds the saved data. |
| + // Returns success or failure. |
| + virtual bool Deserialize(Pickle* pickle) = 0; |
| + |
| protected: |
| SecureHash() {} |