Winner's Dev Notes

Code, games, and the craft of building better software

Facebook Android Key Hash: Convert Signing SHA-1 to Base64

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.