根據簽名獲取hashCode的值

int checkAPP(Context context) { try { PackageInfo packageInfo = context.getPackageManager() .getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES); Signature[] signs = packageInfo.signatures; Signature sign = signs[0];code

int hashcode = sign.hashCode();
  Log.i("test", "hashCode : " + hashcode);
  return hashcode == -82892576 ? 1 : 0;

} catch (Exception e) { e.printStackTrace(); } return -1; }get

相關文章
相關標籤/搜索