| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_QUIC_CRYPTO_CRYPTO_SECRET_BOXER_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_SECRET_BOXER_H_ |
| 6 #define NET_QUIC_CRYPTO_CRYPTO_SECRET_BOXER_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_SECRET_BOXER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 12 #include "base/macros.h" |
| 10 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
| 11 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 12 | 15 |
| 13 namespace net { | 16 namespace net { |
| 14 | 17 |
| 15 class QuicRandom; | 18 class QuicRandom; |
| 16 | 19 |
| 17 // CryptoSecretBoxer encrypts small chunks of plaintext (called 'boxing') and | 20 // CryptoSecretBoxer encrypts small chunks of plaintext (called 'boxing') and |
| 18 // then, later, can authenticate+decrypt the resulting boxes. This object is | 21 // then, later, can authenticate+decrypt the resulting boxes. This object is |
| 19 // thread-safe. | 22 // thread-safe. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 44 | 47 |
| 45 private: | 48 private: |
| 46 std::string key_; | 49 std::string key_; |
| 47 | 50 |
| 48 DISALLOW_COPY_AND_ASSIGN(CryptoSecretBoxer); | 51 DISALLOW_COPY_AND_ASSIGN(CryptoSecretBoxer); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 } // namespace net | 54 } // namespace net |
| 52 | 55 |
| 53 #endif // NET_QUIC_CRYPTO_CRYPTO_SECRET_BOXER_H_ | 56 #endif // NET_QUIC_CRYPTO_CRYPTO_SECRET_BOXER_H_ |
| OLD | NEW |