| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Utility class for calculating the HMAC for a given message. We currently | 5 // Utility class for calculating the HMAC for a given message. We currently |
| 6 // only support SHA1 for the hash algorithm, but this can be extended easily. | 6 // only support SHA1 for the hash algorithm, but this can be extended easily. |
| 7 | 7 |
| 8 #ifndef CRYPTO_HMAC_H_ | 8 #ifndef CRYPTO_HMAC_H_ |
| 9 #define CRYPTO_HMAC_H_ | 9 #define CRYPTO_HMAC_H_ |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include <stddef.h> |
| 12 |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
| 15 #include "crypto/crypto_export.h" | 17 #include "crypto/crypto_export.h" |
| 16 | 18 |
| 17 namespace crypto { | 19 namespace crypto { |
| 18 | 20 |
| 19 // Simplify the interface and reduce includes by abstracting out the internals. | 21 // Simplify the interface and reduce includes by abstracting out the internals. |
| 20 struct HMACPlatformData; | 22 struct HMACPlatformData; |
| 21 class SymmetricKey; | 23 class SymmetricKey; |
| 22 | 24 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 private: | 86 private: |
| 85 HashAlgorithm hash_alg_; | 87 HashAlgorithm hash_alg_; |
| 86 scoped_ptr<HMACPlatformData> plat_; | 88 scoped_ptr<HMACPlatformData> plat_; |
| 87 | 89 |
| 88 DISALLOW_COPY_AND_ASSIGN(HMAC); | 90 DISALLOW_COPY_AND_ASSIGN(HMAC); |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 } // namespace crypto | 93 } // namespace crypto |
| 92 | 94 |
| 93 #endif // CRYPTO_HMAC_H_ | 95 #endif // CRYPTO_HMAC_H_ |
| OLD | NEW |