| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHACHA20_POLY1305_RFC7539_ENCRYPTER_H_ | 5 #ifndef NET_QUIC_CRYPTO_CHACHA20_POLY1305_RFC7539_ENCRYPTER_H_ |
| 6 #define NET_QUIC_CRYPTO_CHACHA20_POLY1305_RFC7539_ENCRYPTER_H_ | 6 #define NET_QUIC_CRYPTO_CHACHA20_POLY1305_RFC7539_ENCRYPTER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 kAuthTagSize = 12, | 26 kAuthTagSize = 12, |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 ChaCha20Poly1305Rfc7539Encrypter(); | 29 ChaCha20Poly1305Rfc7539Encrypter(); |
| 30 ~ChaCha20Poly1305Rfc7539Encrypter() override; | 30 ~ChaCha20Poly1305Rfc7539Encrypter() override; |
| 31 | 31 |
| 32 // Returns true if the underlying crypto library supports the RFC 7539 | 32 // Returns true if the underlying crypto library supports the RFC 7539 |
| 33 // variant of ChaCha20+Poly1305. | 33 // variant of ChaCha20+Poly1305. |
| 34 static bool IsSupported(); | 34 static bool IsSupported(); |
| 35 | 35 |
| 36 #if !defined(USE_OPENSSL) | |
| 37 protected: | |
| 38 // AeadBaseEncrypter methods: | |
| 39 void FillAeadParams(base::StringPiece nonce, | |
| 40 base::StringPiece associated_data, | |
| 41 size_t auth_tag_size, | |
| 42 AeadParams* aead_params) const override; | |
| 43 #endif | |
| 44 | |
| 45 private: | 36 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(ChaCha20Poly1305Rfc7539Encrypter); | 37 DISALLOW_COPY_AND_ASSIGN(ChaCha20Poly1305Rfc7539Encrypter); |
| 47 }; | 38 }; |
| 48 | 39 |
| 49 } // namespace net | 40 } // namespace net |
| 50 | 41 |
| 51 #endif // NET_QUIC_CRYPTO_CHACHA20_POLY1305_RFC7539_ENCRYPTER_H_ | 42 #endif // NET_QUIC_CRYPTO_CHACHA20_POLY1305_RFC7539_ENCRYPTER_H_ |
| OLD | NEW |