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/cryptauth/eid_generator.h" | 5 #include "components/cryptauth/eid_generator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/test/simple_test_clock.h" | 12 #include "base/test/simple_test_clock.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 14 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
15 #include "components/proximity_auth/remote_device.h" | 15 #include "components/cryptauth/remote_device.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 16 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 using testing::_; | 19 using testing::_; |
20 using testing::AtLeast; | 20 using testing::AtLeast; |
21 using testing::NiceMock; | 21 using testing::NiceMock; |
22 using testing::Return; | 22 using testing::Return; |
23 using testing::StrictMock; | 23 using testing::StrictMock; |
24 using testing::SaveArg; | 24 using testing::SaveArg; |
25 | 25 |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 std::string test_eid_without_entropy2 = helper.GenerateEidDataForDevice( | 708 std::string test_eid_without_entropy2 = helper.GenerateEidDataForDevice( |
709 test_eid_seed2_str, test_timestamp2, nullptr); | 709 test_eid_seed2_str, test_timestamp2, nullptr); |
710 EXPECT_EQ("\x02\xdd", test_eid_without_entropy2); | 710 EXPECT_EQ("\x02\xdd", test_eid_without_entropy2); |
711 | 711 |
712 std::string test_eid_with_entropy2 = helper.GenerateEidDataForDevice( | 712 std::string test_eid_with_entropy2 = helper.GenerateEidDataForDevice( |
713 test_eid_seed2_str, test_timestamp2, &test_entropy2_str); | 713 test_eid_seed2_str, test_timestamp2, &test_entropy2_str); |
714 EXPECT_EQ("\xee\xcc", test_eid_with_entropy2); | 714 EXPECT_EQ("\xee\xcc", test_eid_with_entropy2); |
715 } | 715 } |
716 | 716 |
717 } // namespace cryptauth | 717 } // namespace cryptauth |
OLD | NEW |