OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/gcm_driver/crypto/gcm_message_cryptographer.h" | 5 #include "components/gcm_driver/crypto/gcm_message_cryptographer.h" |
6 | 6 |
7 #include <openssl/aead.h> | 7 #include <openssl/aead.h> |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "base/numerics/safe_math.h" | 12 #include "base/numerics/safe_math.h" |
11 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
12 | 14 |
13 namespace gcm { | 15 namespace gcm { |
14 | 16 |
15 namespace { | 17 namespace { |
16 | 18 |
17 // The BoringSSL functions used to seal (encrypt) and open (decrypt) a payload | 19 // The BoringSSL functions used to seal (encrypt) and open (decrypt) a payload |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 else | 73 else |
72 expected_output_length -= kAuthenticationTagBytes; | 74 expected_output_length -= kAuthenticationTagBytes; |
73 | 75 |
74 DCHECK_EQ(expected_output_length.ValueOrDie(), output_length); | 76 DCHECK_EQ(expected_output_length.ValueOrDie(), output_length); |
75 | 77 |
76 output->resize(output_length); | 78 output->resize(output_length); |
77 return true; | 79 return true; |
78 } | 80 } |
79 | 81 |
80 } // namespace gcm | 82 } // namespace gcm |
OLD | NEW |