This is a library module built to get android app's signature(SHA-1 digested).
You can use java's MessageDigest class to get app signature directly, but for security reason I chose to utilize NDK way.
Yes, It's not perfectly secure, but at least it can make crackers to waste some more time, isn't it?
Run Gradle's :signaturecheker/build script,
then you can find signaturechecker-release.aar in [project_path]/sicnaturechecker/build/outputs/aar path.
Copy and paste this aar file to your android project's libs/ folder and follow the next step described here.
Then you're ready to go!
(...Or just copy & paste signaturechecker module folder to your project :P)
To get app's default signature string,
...
String signature = SignatureChecker.getSignature(*activity*);
...
To add salt string to your app's signature string,
...
String saltedSignature = SignatureChecker.getSignature(*activity*, "ThisIsMySaltString");
...
Salt string is converted to byte array and then passed as a parameter for MessageDigest.Update() method.
- I highly recommend to use salt string, and use this module with your own server to compare hash!