| Index: crypto/encryptor.h
|
| diff --git a/crypto/encryptor.h b/crypto/encryptor.h
|
| index 6b236199e75dcbea6532c881388315f7bfae6580..5e919ca5e7e3c1ce650e0e689d1ae4809f8c2082 100644
|
| --- a/crypto/encryptor.h
|
| +++ b/crypto/encryptor.h
|
| @@ -9,6 +9,7 @@
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/string_piece.h"
|
| #include "build/build_config.h"
|
| @@ -39,7 +40,7 @@ class CRYPTO_EXPORT Encryptor {
|
| ~Counter();
|
|
|
| // Increment the counter value.
|
| - bool Increment();
|
| + bool Increment() WARN_UNUSED_RESULT;
|
|
|
| // Write the content of the counter to |buf|. |buf| should have enough
|
| // space for |GetLengthInBytes()|.
|
| @@ -63,20 +64,24 @@ class CRYPTO_EXPORT Encryptor {
|
| //
|
| // If |mode| is CBC, |iv| must not be empty; if it is CTR, then |iv| must be
|
| // empty.
|
| - bool Init(SymmetricKey* key, Mode mode, const base::StringPiece& iv);
|
| + bool Init(SymmetricKey* key,
|
| + Mode mode,
|
| + const base::StringPiece& iv) WARN_UNUSED_RESULT;
|
|
|
| // Encrypts |plaintext| into |ciphertext|. |plaintext| may only be empty if
|
| // the mode is CBC.
|
| - bool Encrypt(const base::StringPiece& plaintext, std::string* ciphertext);
|
| + bool Encrypt(const base::StringPiece& plaintext,
|
| + std::string* ciphertext) WARN_UNUSED_RESULT;
|
|
|
| // Decrypts |ciphertext| into |plaintext|. |ciphertext| must not be empty.
|
| - bool Decrypt(const base::StringPiece& ciphertext, std::string* plaintext);
|
| + bool Decrypt(const base::StringPiece& ciphertext,
|
| + std::string* plaintext) WARN_UNUSED_RESULT;
|
|
|
| // Sets the counter value when in CTR mode. Currently only 128-bits
|
| // counter value is supported.
|
| //
|
| // Returns true only if update was successful.
|
| - bool SetCounter(const base::StringPiece& counter);
|
| + bool SetCounter(const base::StringPiece& counter) WARN_UNUSED_RESULT;
|
|
|
| // TODO(albertb): Support streaming encryption.
|
|
|
|
|