Generating SHA-256 Fingerprint in Flutter
1 min readOct 18, 2024
When working with Flutter for Android development, you may need to generate a SHA-256 fingerprint for tasks like Firebase integration. Here’s how to do it step-by-step.
Steps to Generate SHA-256 Fingerprint
- Navigate to the Android Directory: Open your terminal and change to your Flutter project’s Android directory by running:
cd ./android
2. Run the Keytool Command: Use the following command to extract the SHA-256 fingerprint from the debug keystore:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
- Command Breakdown:
keytool
: The command used to manage keystores.-list
: Lists the contents of the keystore.-v
: Enables verbose output for more detailed information.-keystore ~/.android/debug.keystore
: Path to the default debug keystore.-alias androiddebugkey
: The alias for the debug key.-storepass android
: Password for the keystore (default for debug).-keypass android
: Password for the key (also default for debug).- Locate the SHA-256 Fingerprint: After running the command, look for the line that starts with
SHA256:
. This will display your SHA-256 fingerprint. - Example output:
SHA256: 12:34:56:78:90:AB:CD:EF:GH:IJ:KL:MN:OP:QR:ST:UV:WX:YZ:12:34:56:78:90:AB:CD:EF:GH:IJ
Conclusion
That’s it! You’ve successfully generated the SHA-256 fingerprint for your Flutter Android debug keystore. This fingerprint can now be used for Firebase configuration or other services. Happy coding!