Reputation: 508
How safe is the app signature in android, obtained through the following code?
sigs = this.getPackageManager().getPackageInfo(this.getPackageName(), PackageManager.GET_SIGNATURES).signatures;
privateKey = sig[0].hashCode();
I am thinking of using the app's signature as a private key in communication with a web server. How secure is this approach?
Upvotes: 2
Views: 395
Reputation: 52936
Absolutely insecure. The so called 'signature' is the signing certificate and anyone who can use WinZip can extract it from your APK. It is not meant to be secret, so don't treat it as such. If you want to communicate securely with a Web server use HTTPS (SSL).
Upvotes: 2