OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/google_authenticator.h" | 5 #include "chrome/browser/chromeos/login/google_authenticator.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 const std::string& login_token, | 405 const std::string& login_token, |
406 const std::string& login_captcha) { | 406 const std::string& login_captcha) { |
407 NOTIMPLEMENTED(); | 407 NOTIMPLEMENTED(); |
408 } | 408 } |
409 | 409 |
410 void GoogleAuthenticator::VerifyOAuth1AccessToken( | 410 void GoogleAuthenticator::VerifyOAuth1AccessToken( |
411 const std::string& auth1_token, const std::string& oauth1_secret) { | 411 const std::string& auth1_token, const std::string& oauth1_secret) { |
412 NOTIMPLEMENTED(); | 412 NOTIMPLEMENTED(); |
413 } | 413 } |
414 | 414 |
| 415 std::string GoogleAuthenticator::EncryptToken(const std::string& unused) { |
| 416 NOTIMPLEMENTED(); |
| 417 return std::string(); |
| 418 } |
| 419 |
| 420 std::string GoogleAuthenticator::DecryptToken(const std::string& unused) { |
| 421 NOTIMPLEMENTED(); |
| 422 return std::string(); |
| 423 } |
| 424 |
| 425 |
415 void GoogleAuthenticator::LoadSystemSalt() { | 426 void GoogleAuthenticator::LoadSystemSalt() { |
416 if (!system_salt_.empty()) | 427 if (!system_salt_.empty()) |
417 return; | 428 return; |
418 system_salt_ = CrosLibrary::Get()->GetCryptohomeLibrary()->GetSystemSalt(); | 429 system_salt_ = CrosLibrary::Get()->GetCryptohomeLibrary()->GetSystemSalt(); |
419 CHECK(!system_salt_.empty()); | 430 CHECK(!system_salt_.empty()); |
420 CHECK_EQ(system_salt_.size() % 2, 0U); | 431 CHECK_EQ(system_salt_.size() % 2, 0U); |
421 } | 432 } |
422 | 433 |
423 void GoogleAuthenticator::LoadLocalaccount(const std::string& filename) { | 434 void GoogleAuthenticator::LoadLocalaccount(const std::string& filename) { |
424 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 435 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 const unsigned int len) { | 503 const unsigned int len) { |
493 if (len < 2*binary_len) | 504 if (len < 2*binary_len) |
494 return false; | 505 return false; |
495 memset(hex_string, 0, len); | 506 memset(hex_string, 0, len); |
496 for (uint i = 0, j = 0; i < binary_len; i++, j+=2) | 507 for (uint i = 0, j = 0; i < binary_len; i++, j+=2) |
497 snprintf(hex_string + j, len - j, "%02x", binary[i]); | 508 snprintf(hex_string + j, len - j, "%02x", binary[i]); |
498 return true; | 509 return true; |
499 } | 510 } |
500 | 511 |
501 } // namespace chromeos | 512 } // namespace chromeos |
OLD | NEW |