Firebase

Get debug SHA1 & SHA256 debug keys on Windows

By June 4, 2020No Comments

While setting up a Firebase project you might be asked for a SHA1 key. Later if you want to set up Google or Facebook authentication you might need a SHA256 key too.

Open up your terminal prompt. Run this command. Replace the yourusernamehere with your own username.

keytool -list -v -keystore "C:\Users\yourusernamehere\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

If you get an error saying:

'keytool' is not recognized as an internal or external command,
operable program or batch file.

If you have Android Studio on your computer you can cd into:

C:\Program Files\Android\Android Studio\jre\bin

and run the keytool command in this folder. You will get a set of keys displayed in your terminal:

droiddebugkey -storepass android -keypass android
Alias name: androiddebugkey
Creation date: 10 Apr, 2020
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: C=US, O=Android, CN=Android Debug
Issuer: C=US, O=Android, CN=Android Debug
Serial number: 1
Valid from: Fri Apr 10 19:49:13 IST 2020 until: Sun Apr 03 19:49:13 IST 2050
Certificate fingerprints:
MD5: A9:7C:C4:8D:F3:D3:2D:F3:89:57:7F:E5:05:68:BA:E3
SHA1: 32:12:C1:E7:01:1A:62:32:3A:D2:7D:9D:22:AD:F2:A8:17:EC:12:79
SHA256: 6C:A9:7C:C4:8D:F3:D3:2D:F3:89:57:7F:E5:05:68:BA:E3:CD:AB:62:2E:CA:C2:4S:9A:2A:1A:26:FE:15:54:E2
Signature algorithm name: SHA1withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 1

Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore C:\Users\Manish.android\debug.keystore -destkeystore C:\Users\Manish.android\debug.keystore -deststoretype pkcs12".

Copy the SHA keys into your Firebase project. Save these keys. You can use them for future projects.

digitalant

Author digitalant

More posts by digitalant

Leave a Reply

twelve − 11 =

Open chat