| 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 <pk11pub.h> | 7 #include <pk11pub.h> |
| 8 #include <secerr.h> | 8 #include <secerr.h> |
| 9 #include <stddef.h> |
| 9 | 10 |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "base/numerics/safe_math.h" | 12 #include "base/numerics/safe_math.h" |
| 12 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 13 #include "crypto/scoped_nss_types.h" | 14 #include "crypto/scoped_nss_types.h" |
| 14 | 15 |
| 15 namespace gcm { | 16 namespace gcm { |
| 16 | 17 |
| 17 bool GCMMessageCryptographer::EncryptDecryptRecordInternal( | 18 bool GCMMessageCryptographer::EncryptDecryptRecordInternal( |
| 18 Mode mode, | 19 Mode mode, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 else | 85 else |
| 85 expected_output_length -= kAuthenticationTagBytes; | 86 expected_output_length -= kAuthenticationTagBytes; |
| 86 | 87 |
| 87 DCHECK_EQ(expected_output_length.ValueOrDie(), output_length); | 88 DCHECK_EQ(expected_output_length.ValueOrDie(), output_length); |
| 88 | 89 |
| 89 output->resize(output_length); | 90 output->resize(output_length); |
| 90 return true; | 91 return true; |
| 91 } | 92 } |
| 92 | 93 |
| 93 } // namespace gcm | 94 } // namespace gcm |
| OLD | NEW |