Nanfeng

Notes on software development, code, and curious ideas

Generating a Facebook Android Key Hash

The usual command produced an unexpected 24-character value instead of the required key hash:

1
keytool -exportcert -alias YOUR_ALIAS -keystore YOUR_KEYSTORE | openssl sha1 -binary | openssl base64
Unexpected result

An alternative is to print the signing certificate details:

1
keytool -list -v -keystore key.jks -alias key0

Copy the SHA-1 fingerprint:

SHA-1 fingerprint

Remove separators, convert the hexadecimal bytes to Base64 with a trusted local tool, and register the result in the Facebook developer console.

+