Last active
April 8, 2025 02:55
-
-
Save nqmgaming/5826760b4e82e8100872ca3cf4825cb3 to your computer and use it in GitHub Desktop.
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
private fun logAppKeyHash() { | |
try { | |
val info = packageManager.getPackageInfo( | |
"com.pwhs.quickmem", | |
PackageManager.GET_SIGNING_CERTIFICATES | |
) | |
for (signature in info.signingInfo!!.apkContentsSigners) { | |
val md = MessageDigest.getInstance("SHA") | |
md.update(signature.toByteArray()) | |
Timber.d("KeyHash: ${Base64.encodeToString(md.digest(), Base64.DEFAULT)}") | |
} | |
} catch (e: NameNotFoundException) { | |
} catch (e: NoSuchAlgorithmException) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment