我在應用程序中有一段代碼,它在運行時檢索應用程序證書並將其用作加密某些機密信息的密鑰。Android apk安全性如何安全
某些攻擊者是否有可能通過反編譯我的代碼來獲取該證書byte[]
或者該證書是否僅對我的應用程序可見?
這裏是我拿到證書:
PackageManager pm = this.getPackageManager();
String packageName = this.getPackageName();
int field = PackageManager.GET_SIGNATURES;
PackageInfo packageInfo;
packageInfo = pm.getPackageInfo(packageName, field);
Signature[] signatures = packageInfo.signatures;
// and here we have the DER encoded X.509 certificate
byte[] certificate = signatures[0].toByteArray()