0

SHA1 for Debug

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android 

SHA1 for Release

keytool -list -v -keystore "/home/compe18/Keystore folder/keystore.jks" -alias keystore Alias Name -storepass password -keypass password 

Note: storepass and keypass are applicaiton Keystore password, keystore = keystore path,alias = Key alias Name (name used at the time of creating Keystore).....

2
  • 1
    so what is your question? Commented Sep 21, 2015 at 7:10
  • To get sha1 for map it will be usefull... Commented Sep 21, 2015 at 9:24

1 Answer 1

1

You can also run the following code:

try { PackageInfo info = getPackageManager().getPackageInfo( "yourpackagename", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); } } catch (NameNotFoundException e) { } catch (NoSuchAlgorithmException e) {} } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.