Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: components/cryptauth/eid_generator.cc

Issue 2611913002: Tweak CryptauthDeviceManager to store fetched BeaconSeed data in Base64URL encoding, and retrieve i… (Closed)
Patch Set: Fixing a comment. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/cryptauth/cryptauth_device_manager_unittest.cc ('k') | components/cryptauth/eid_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698