Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
import android.graphics.BlurMaskFilter | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.foundation.layout.requiredSize | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.remember | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.composed |
/** | |
* Get SHA256 from PackageManager / PackageInfo / Signatures | |
*/ | |
fun printSignature() { | |
val packageManager: PackageManager = CONTEXT.getPackageManager() | |
val signature: Array<Signature> = packageManager.getPackageInfo("YOUR PACKAGE_NAME, LIKE com.xx.yy.zz", PackageManager.GET_SIGNATURES).signatures | |
signature.asIterable().forEach { | |
Log.i("SHA256", getFingerprint(it)) | |
} |
/** | |
* Get fingerprint from a certificate in android.content.pm.Signature | |
* @return String fingerprint that contains the SHA-256 digest | |
*/ | |
private static String getFingerprint(android.content.pm.Signature ce){ | |
String certificate = ""; | |
InputStream input = new ByteArrayInputStream(ce.toByteArray()); | |
CertificateFactory cf = null; | |
try { |
Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
/** | |
* Copyright 2016 Ali Muzaffar | |
* <p/> | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* <p/> | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* <p/> | |
* Unless required by applicable law or agreed to in writing, software |
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |