Created
May 18, 2012 16:38
-
-
Save ziglee/2726281 to your computer and use it in GitHub Desktop.
Android Key Hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PackageInfo info = getPackageManager().getPackageInfo("<your_package_name>", PackageManager.GET_SIGNATURES); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
Log.d("Hash Key:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment