0

I'm trying to generate key hash code for android on (Windows 8.1 PRO 64x) according to these steps Android key hash for Facebook App. I did it before and worked well but was for windows 8, now I followed all the steps and the hash code I got was this.

Imgur

Any suggestions how to solve it or what is this ??

Mohamed Usama
  • 99
  • 2
  • 13
  • 1
    You can use my simple tool i created for windows. check it out :[here][1] [1]: http://stackoverflow.com/a/17732453/2476453 – Shahar Jan 11 '14 at 21:42
  • possible duplicate of [key hash for android-facebook app](http://stackoverflow.com/questions/4388992/key-hash-for-android-facebook-app) – Shahar Jan 11 '14 at 21:43

1 Answers1

0

You can have your hash in a easier way, like in the offical Facebook's documentation.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Add code to print out the key hash
    try {
        PackageInfo info = getPackageManager().getPackageInfo(
                "com.facebook.samples.hellofacebook", 
                PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            }
    } catch (NameNotFoundException e) {

    } catch (NoSuchAlgorithmException e) {

    }

    ...
}
yugidroid
  • 6,640
  • 2
  • 30
  • 45