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 "chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrappe
r.h" | 5 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrappe
r.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/macros.h" |
8 #include "components/proximity_auth/cryptauth/proto/securemessage.pb.h" | 9 #include "components/proximity_auth/cryptauth/proto/securemessage.pb.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 namespace { | 13 namespace { |
13 | 14 |
14 const char kSalt[] = | 15 const char kSalt[] = |
15 "\xbf\x9d\x2a\x53\xc6\x36\x16\xd7\x5d\xb0\xa7\x16\x5b\x91\xc1\xef\x73\xe5" | 16 "\xbf\x9d\x2a\x53\xc6\x36\x16\xd7\x5d\xb0\xa7\x16\x5b\x91\xc1\xef\x73\xe5" |
16 "\x37\xf2\x42\x74\x05\xfa\x23\x61\x0a\x4b\xe6\x57\x64\x2e"; | 17 "\x37\xf2\x42\x74\x05\xfa\x23\x61\x0a\x4b\xe6\x57\x64\x2e"; |
17 | 18 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 ASSERT_TRUE(challenge_secure_message.ParseFromString(wrapped_challenge)); | 71 ASSERT_TRUE(challenge_secure_message.ParseFromString(wrapped_challenge)); |
71 EXPECT_EQ(kChallenge, challenge_secure_message.header_and_body()); | 72 EXPECT_EQ(kChallenge, challenge_secure_message.header_and_body()); |
72 | 73 |
73 securemessage::SecureMessage signature_secure_message; | 74 securemessage::SecureMessage signature_secure_message; |
74 ASSERT_TRUE(signature_secure_message.ParseFromString( | 75 ASSERT_TRUE(signature_secure_message.ParseFromString( |
75 challenge_secure_message.signature())); | 76 challenge_secure_message.signature())); |
76 EXPECT_EQ(kSignature, signature_secure_message.signature()); | 77 EXPECT_EQ(kSignature, signature_secure_message.signature()); |
77 } | 78 } |
78 | 79 |
79 } // namespace chromeos | 80 } // namespace chromeos |
OLD | NEW |