Created
June 1, 2013 10:35
-
-
Save r-52/5689950 to your computer and use it in GitHub Desktop.
This file contains 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
private static final String = ""; | |
try { | |
PackageInfo info = getPackageManager().getPackageInfo( | |
PACKAGE_NAME, | |
PackageManager.GET_SIGNATURES); | |
Log.i("","Test"); | |
for (Signature signature : info.signatures) { | |
MessageDigest md = MessageDigest.getInstance("SHA"); | |
md.update(signature.toByteArray()); | |
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
Log.i("", Base64.encodeToString(md.digest(), Base64.DEFAULT)); | |
} | |
} catch (NameNotFoundException e) { | |
} catch (NoSuchAlgorithmException e) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment