Please follow the steps below to protect your Android library with Quixxi Security
Create a new app in Quixxi Portal using
“Add New” button.
"Create your app"dialog give a name of your application and click Continue
Click the newly created app and choose
"Security"in the header tab.
- Scroll down to the bottom of the page and click the "
Protect"button Under the Code Protection in the left side of the window.
- In the next window make sure
AndroidRadio button is selected and select the aar to be uploaded.
- Scroll down the window and the choose the appropriate plan and then click
Nextto start uploading the jar.
- Once Quixxi Security is applied to the jar, Click on the
Download Protectedjar on the top right corner under the header to download the protected app.
- Copy the native library (.so) to your libs directory
- Replace your application source packages (packaged as jar which was meant to be secured) with the secured source packages generated from Quixxi Security
- Once the libs and packages are integrated, you need to add the lines of code specified below to your main application
<span style="font-size: 14px;"><span style="font-family: 'Times New Roman',Times,serif;">classSecurity security = new Security(getApplicationContext()); security.registerNative(getApplicationContext()); security.loadNative();</span></span>
Usage of Utility API in Java Archive (jar)
In addition to features, quixxi security provides utility APIs for usage in application development. You can also check out our API Reference for more detailed information about our SDK.
Steps to Encrypt and Decrypt in Java Archive (jar)
Quixxi Security provides APIs to encrypt confidential information and use the encrypted data and decrypt the encrypted text to get back the original data when required. You could use the AES algorithm or base 64 encoding/decoding mechanism for your encryption and decryption scenarios.
A snippet of usage of encryption and decryption as
EncryptionUtils mEncryptionUtils = new EncryptionUtils(); // Encrypts given text to encrypted text using AES mEncryptionUtils.encryptAES("Example String to be Encrypted","My Encryption Password"); //Encrypt file content in the given path mEncryptionUtils.encryptFile("My Encryption Password",inputFilename, outputFilename); // Encrypts given text to encrypted text using base64 method mEncryptionUtils.encodeString("Example String to be Encrypted"); // Decrypt encrypted text to original text using AES mEncryptionUtils.decryptAES("Encrypted text","My Encyption Password"); //Decrypt file content in the given path mEncryptionUtils.decryptFile("My Encryption Password","inputFilename","outputFilename"); //Decrypt a encoded string usign base64 method mEncryptionUtils.decodeString("Encrypted String");'
Usage of Shared Preferences API in Java Archive (jar)
You may wish to have a secured place inside the device, so that you can save the data you want and retrieve it later when necessary. This functionality is achieved by using our Shared Preferences APIs. The shared preferences in the devices is like a secret location which cannot be seen or tracked by casual looking or searching. So, the APIs use this place for storing any secret data which is required at some time or the other.
// save String to preference A.saveStringPreferences("name of the shared preference","modified preference name ", "string to be stored in the preference" ); // retrieve the string value from preference A.getStringPreferences("name of the preference file","name of the shared preference", default String value to return if preference doesn't exist );