1.代码查询(查询到出来全是小写)
/**
* 获取app签名md5值
*/
public String getSignMd5Str() {
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_SIGNATURES);
Signature[] signs = packageInfo.signatures;
Signature sign = signs[0];
String signStr = encryptionMD5(sign.toByteArray());
return signStr;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return "";
}
/**
* MD5加密
* @param byteStr 需要加密的内容
* @return 返回 byteStr的md5值
*/
public static String encryptionMD5(byte[] byteStr) {
MessageDigest messageDigest = null;
StringBuffer md5StrBuff = new StringBuffer();
try {
messageDigest = MessageDigest.getInstance("MD5&