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 #include "net/quic/core/crypto/curve25519_key_exchange.h" | 5 #include "net/quic/core/crypto/curve25519_key_exchange.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/strings/string_piece.h" | |
10 #include "net/quic/core/crypto/quic_random.h" | 9 #include "net/quic/core/crypto/quic_random.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
12 | 11 |
13 using base::StringPiece; | 12 using base::StringPiece; |
14 using std::string; | 13 using std::string; |
15 | 14 |
16 namespace net { | 15 namespace net { |
17 namespace test { | 16 namespace test { |
18 | 17 |
19 // SharedKey just tests that the basic key exchange identity holds: that both | 18 // SharedKey just tests that the basic key exchange identity holds: that both |
(...skipping 15 matching lines...) Expand all Loading... |
35 | 34 |
36 string alice_shared, bob_shared; | 35 string alice_shared, bob_shared; |
37 ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared)); | 36 ASSERT_TRUE(alice->CalculateSharedKey(bob_public, &alice_shared)); |
38 ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared)); | 37 ASSERT_TRUE(bob->CalculateSharedKey(alice_public, &bob_shared)); |
39 ASSERT_EQ(alice_shared, bob_shared); | 38 ASSERT_EQ(alice_shared, bob_shared); |
40 } | 39 } |
41 } | 40 } |
42 | 41 |
43 } // namespace test | 42 } // namespace test |
44 } // namespace net | 43 } // namespace net |
OLD | NEW |