Skip to content

Instantly share code, notes, and snippets.

@neuberoliveira
Created November 29, 2017 17:21
Show Gist options
  • Save neuberoliveira/f9dabd8afe715f7ffa86a2a1e7601358 to your computer and use it in GitHub Desktop.
Save neuberoliveira/f9dabd8afe715f7ffa86a2a1e7601358 to your computer and use it in GitHub Desktop.
Generate keyhashfor android app based on your keystore file
#!/bin/bash
if [ ! $1 ]; then
echo 'Keystore file is required'
exit
fi
if [ ! $2 ]; then
echo 'Alias is required'
exit
fi
alias=$2
keystore=$1
echo $alias
echo $keystore
keytool -exportcert -alias $alias -keystore $keystore | openssl sha1 -binary | openssl base64
@neuberoliveira
Copy link
Author

Usage

generate-keyhash APP_ALIAS path/to/keystore

Dont forget to give it execute permission chmod +x generate-keyhash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment