OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/cryptohome/system_salt_getter.h" | 5 #include "chromeos/cryptohome/system_salt_getter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // static | 88 // static |
89 SystemSaltGetter* SystemSaltGetter::Get() { | 89 SystemSaltGetter* SystemSaltGetter::Get() { |
90 CHECK(g_system_salt_getter) | 90 CHECK(g_system_salt_getter) |
91 << "SystemSaltGetter::Get() called before Initialize()"; | 91 << "SystemSaltGetter::Get() called before Initialize()"; |
92 return g_system_salt_getter; | 92 return g_system_salt_getter; |
93 } | 93 } |
94 | 94 |
95 // static | 95 // static |
96 std::string SystemSaltGetter::ConvertRawSaltToHexString( | 96 std::string SystemSaltGetter::ConvertRawSaltToHexString( |
97 const std::vector<uint8>& salt) { | 97 const std::vector<uint8>& salt) { |
98 return base::StringToLowerASCII(base::HexEncode( | 98 return base::ToLowerASCII( |
99 reinterpret_cast<const void*>(salt.data()), salt.size())); | 99 base::HexEncode(reinterpret_cast<const void*>(salt.data()), salt.size())); |
100 } | 100 } |
101 | 101 |
102 } // namespace chromeos | 102 } // namespace chromeos |
OLD | NEW |