> For the complete documentation index, see [llms.txt](https://docs.talsec.app/freerasp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talsec.app/freerasp/freerasp/wiki/getting-signing-certificate-hash/manual-app-signing-method.md).

# Manual App Signing Method

You sign your Android application (APK) yourself using a private key that's stored in a keystore.

## Step 1: Use Your Release Keystore to Get the SHA-256 Hash

A common mistake is using the wrong signing key, which will cause the Talsec SDK to flag your app as a security risk. To avoid this, you must use the keystore that signs your app for public release.

Here’s the difference:

* **Debug Keystore**: Created automatically by Android Studio. **DO NOT USE THIS ONE**. It is insecure and only for development purposes.
* **Release Keystore**: The secure keystore you create and manage. **USE THIS ONE**. It's what permanently ties your app to you as the developer.

If you haven't created a release keystore yet, the [official Android App Signing guide](https://developer.android.com/studio/publish/app-signing#generate-key) will walk you through the process.

## **Step 2: Retrieve SHA-256 Hash**

You can use tools like `keytool` or `apksigner` to retrieve certificate details, including the SHA-256 hash. Choose whichever is most convenient: get the hash from your signed release APK or directly from your release keystore:

```sh
keytool -printcert -jarfile app.apk
// OR:
apksigner verify --print-certs app.apk
```

<details>

<summary>Alternative approach if you have a keystore file (.jks or .keystore)</summary>

```
keytool -list -v -keystore <path_to_your_keystore_file> -alias <your_alias_name>
```

* `-keystore <path_to_your_keystore_file>`: Specifies the full path to your keystore file. Replace `<path_to_your_keystore_file>` with the actual location of your `.jks` or `.keystore` file.
* `-alias <your_alias_name>`: Specifies the alias for the specific key you want to inspect within the keystore. Replace `<your_alias_name>` with the alias you created for your release key.

**Example:**

```
keytool -list -v -keystore /Users/johndoe/my-release-key.jks -alias my-release-app-alias
```

</details>

This command will output the certificate details, including the SHA-256 hash, which will look something like this:

```
SHA256: 88:8C:7F:02:D6:2E:ED:3A:53:BB:9C:A6:6B:82:5C:0D:78:A8:E5:B6:B2:11:28:BC:F5:AC:67:C8:E0:A3:7C:5A
```

You'll need this value for the next step.

## Step 3: Convert the SHA-256 Hash to Base64 Format

**Convert the hash to Base64 format**, as the SDK requires it in this format. Follow the steps in [**this section**](/freerasp/freerasp/wiki/getting-signing-certificate-hash/result-convert-the-sha-256-hash-to-base64-format.md) ➡️


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.talsec.app/freerasp/freerasp/wiki/getting-signing-certificate-hash/manual-app-signing-method.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
