Unduhan dan Unzip
Anda dapat mengunduh openssl untuk windows 32 dan 64 bit dari masing-masing tautan di bawah ini:
https://code.google.com/archive/p/openssl-for-windows/downloads
OpenSSL untuk 64 Bit OpenSSL untuk 32 Bit
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | **"C:\Users\keshav.gera\openssl-0.9.8k_X64\bin**\openssl.exe" sha1 -binary | **"C:\Users\keshav.gera\openssl-0.9.8k_X64\bin**\openssl.exe" base64
Penting mengubah jalur kami Di Sini serta menginstal open ssl di sistem Anda
Ini Bekerja Tidak Diragukan
C:\Users\keshav.gera>keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | "C:\Users\keshav.gera\openssl-0.9.8k_X64\bin\openssl.exe" sha1 -binary | "C:\Users\keshav.gera\openssl-0.9.8k_X64\bin\openssl.exe" base64
Masukkan kata sandi keystore: android
**ZrRtxw36xWNYL+h3aJdcCeQQxi0=**
================================================== ===========
menggunakan secara manual melalui Coding
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
private void PrintHashKey() {
try {
PackageInfo info = getPackageManager().getPackageInfo("**com.keshav.patanjalidemo Your Package Name Here**", PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
}