Index: chromeos/login/auth/key.cc |
diff --git a/chromeos/login/auth/key.cc b/chromeos/login/auth/key.cc |
index 02733531240edae5b8be37d2c03d00658e8540bc..01c3bcf1ffc89a03b21dc468d4b66b1374a4e01c 100644 |
--- a/chromeos/login/auth/key.cc |
+++ b/chromeos/login/auth/key.cc |
@@ -100,6 +100,10 @@ void Key::Transform(KeyType target_key_type, const std::string& salt) { |
base::Base64Encode(raw_secret, &secret_); |
break; |
} |
+ case KEY_TYPE_SALTED_SHA256: |
+ base::Base64Encode(crypto::SHA256HashString(salt + secret_), &secret_); |
+ break; |
+ |
default: |
// The resulting key will be sent to cryptohomed. It should always be |
// hashed. If hashing fails, crash instead of sending a plain-text key. |