AndroidStudio Security Management signature file keystroe and signature password (Starling brother)

Source: Internet
Author: User

AndroidStudio Security Management signature file keystroe and signature password (Starling brother)
When we use AndroidStudio to sign the release apk, The keystore of the signature file is usually put in the project, and the password is written in build. in gradle, The keystore and password are uploaded to the Git repository along with the code, which is often insecure because it is obtained by people.

This is to modify the build. gradle signature configuration in the previous app.

So how can we manage our keystore and password more securely? Today, I will teach you how to implement keystroe security management.
First, create a "keystore. properties" file under the project, and configure the absolute path, password, alias, and other information of keystroe.

Next, we will configure the signature information in build. gradle in three steps.

Modified Configuration

The preceding three steps are as follows:

Step 1: create a file input stream FileInputStream to obtain the keystore. properties file stream

Step 2: Get the configuration content of keystore. properties through the input stream

Article 3: reference signature

How can this problem be shown to be safer than before? Is there another step to do? Set keystore. properties is added to ignore so that keystore is not uploaded. the properties file is sent to the git repository, which isolates the sensitive signature information from the code uploaded to the git repository, so that our signature information is secure.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.