| 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/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // static | 87 // static |
| 88 SystemSaltGetter* SystemSaltGetter::Get() { | 88 SystemSaltGetter* SystemSaltGetter::Get() { |
| 89 CHECK(g_system_salt_getter) | 89 CHECK(g_system_salt_getter) |
| 90 << "SystemSaltGetter::Get() called before Initialize()"; | 90 << "SystemSaltGetter::Get() called before Initialize()"; |
| 91 return g_system_salt_getter; | 91 return g_system_salt_getter; |
| 92 } | 92 } |
| 93 | 93 |
| 94 // static | 94 // static |
| 95 std::string SystemSaltGetter::ConvertRawSaltToHexString( | 95 std::string SystemSaltGetter::ConvertRawSaltToHexString( |
| 96 const std::vector<uint8>& salt) { | 96 const std::vector<uint8>& salt) { |
| 97 return StringToLowerASCII(base::HexEncode( | 97 return base::StringToLowerASCII(base::HexEncode( |
| 98 reinterpret_cast<const void*>(salt.data()), salt.size())); | 98 reinterpret_cast<const void*>(salt.data()), salt.size())); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace chromeos | 101 } // namespace chromeos |
| OLD | NEW |