OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <cstring> | 7 #include <cstring> |
8 | 8 |
9 #include "base/base64.h" | |
10 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
11 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
12 #include "base/sys_byteorder.h" | 11 #include "base/sys_byteorder.h" |
13 #include "base/time/default_clock.h" | 12 #include "base/time/default_clock.h" |
14 #include "base/time/time.h" | 13 #include "base/time/time.h" |
15 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 14 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
16 #include "components/cryptauth/remote_device.h" | 15 #include "components/cryptauth/remote_device.h" |
17 #include "components/proximity_auth/logging/logging.h" | 16 #include "components/proximity_auth/logging/logging.h" |
18 #include "crypto/sha2.h" | 17 #include "crypto/sha2.h" |
19 | 18 |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 const int64_t end_of_period_timestamp_ms, | 432 const int64_t end_of_period_timestamp_ms, |
434 const int64_t current_timestamp_ms) { | 433 const int64_t current_timestamp_ms) { |
435 DCHECK(start_of_period_timestamp_ms <= current_timestamp_ms); | 434 DCHECK(start_of_period_timestamp_ms <= current_timestamp_ms); |
436 DCHECK(current_timestamp_ms < end_of_period_timestamp_ms); | 435 DCHECK(current_timestamp_ms < end_of_period_timestamp_ms); |
437 | 436 |
438 return current_timestamp_ms < | 437 return current_timestamp_ms < |
439 start_of_period_timestamp_ms + kNumMsInBeginningOfEidPeriod; | 438 start_of_period_timestamp_ms + kNumMsInBeginningOfEidPeriod; |
440 } | 439 } |
441 | 440 |
442 } // namespace cryptauth | 441 } // namespace cryptauth |
OLD | NEW |