| Index: crypto/hmac.h
|
| diff --git a/crypto/hmac.h b/crypto/hmac.h
|
| index a8956ff52b959d0a27e8c52bc5674a91807f5a56..42c2e7c9969e6a9383608a4dbdce390c4e1d6b30 100644
|
| --- a/crypto/hmac.h
|
| +++ b/crypto/hmac.h
|
| @@ -10,6 +10,7 @@
|
| #pragma once
|
|
|
| #include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/string_piece.h"
|
| #include "crypto/crypto_api.h"
|
| @@ -38,11 +39,11 @@ class CRYPTO_API HMAC {
|
| // Initializes this instance using |key| of the length |key_length|. Call Init
|
| // only once. It returns false on the second or later calls.
|
| // TODO(abarth): key_length should be a size_t.
|
| - bool Init(const unsigned char* key, int key_length);
|
| + bool Init(const unsigned char* key, int key_length) WARN_UNUSED_RESULT;
|
|
|
| // Initializes this instance using |key|. Call Init only once. It returns
|
| // false on the second or later calls.
|
| - bool Init(const base::StringPiece& key) {
|
| + bool Init(const base::StringPiece& key) WARN_UNUSED_RESULT {
|
| return Init(reinterpret_cast<const unsigned char*>(key.data()),
|
| static_cast<int>(key.size()));
|
| }
|
| @@ -52,7 +53,7 @@ class CRYPTO_API HMAC {
|
| // returned in |digest|, which has |digest_length| bytes of storage available.
|
| // TODO(abarth): digest_length should be a size_t.
|
| bool Sign(const base::StringPiece& data, unsigned char* digest,
|
| - int digest_length) const;
|
| + int digest_length) const WARN_UNUSED_RESULT;
|
|
|
| // Verifies that the HMAC for the message in |data| equals the HMAC provided
|
| // in |digest|, using the algorithm supplied to the constructor and the key
|
| @@ -62,7 +63,7 @@ class CRYPTO_API HMAC {
|
| // undermine the cryptographic integrity. This method does not support
|
| // comparing truncated HMACs.
|
| bool Verify(const base::StringPiece& data,
|
| - const base::StringPiece& digest) const;
|
| + const base::StringPiece& digest) const WARN_UNUSED_RESULT;
|
|
|
| private:
|
| HashAlgorithm hash_alg_;
|
|
|