Editing Keystone
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 37: | Line 37: | ||
=== Generation === | === Generation === | ||
SCE provides in official | SCE provides in official SDK a tool called pc2ks that converts a passcode to a keystone. | ||
Below is a simple reimplementation of | Below is a simple reimplementation of pc2ks in '''CSharp'''. | ||
<source lang="csharp"> | <source lang="csharp"> | ||
public static byte [] GenerateKeystoneFile (string passcode) | public static byte [] GenerateKeystoneFile (string passcode) | ||
Line 102: | Line 67: | ||
// 6. Concat the constant bytes from point 1, the fingerprint from point 3 and the hmac from point 5 | // 6. Concat the constant bytes from point 1, the fingerprint from point 3 and the hmac from point 5 | ||
keystone = keystone.Concat(sha256hmac).ToArray(); | keystone = keystone.Concat(sha256hmac).ToArray(); | ||
return keystone; | return keystone; | ||
} | } | ||
</source> | </source> |