- You should know where is your keystore file. For me is
C:UsersSelvinDesktopselvin.kp
- You should know your alias in keystore. For me is
selvin
- You should know path to keytool.
C:Program FilesJavajdk1.6.0_22inkeytool.exe
- You should know path to openssl.
C:OpenSSL-Win32inopenssl.exe
- You should know password to keystore. For me is ***** hehe
Then, you should call:
C:Program FilesJavajdk1.6.0_22inkeytool.exe" -exportcert -alias selvin -keystore c:usersselvindesktopselvin.kp | C:OpenSSL-Win32inopenssl sha1 -binary | C:OpenSSL-Win32inopenssl base64
Replace my path and alias with proper ones.
Then you should see:
Enter keystore password:
Enter your password and you should get something like this: NfhDlIH7XWJzUZRjL+pZySrMX1Q=
EDITED: NfgDlIG7XWJzUZRUL+bZySrMX1Q=
<- is a bad hash. Or you got so lucky that your key made the same collision as
error:keytool error: java.lang.Exception: Alias does not exist
If hash not working:
First, call
C:Program FilesJavajdk1.6.0_22inkeytool.exe" -exportcert -alias selvin -keystore c:usersselvindesktopselvin.kp
Type password and read the error
If you don't remember your alias keytool error: java.lang.Exception: Alias <selvinn> does not exist
I used selvinn to show error.
For a list of all your entries/aliases:
C:Program FilesJavajdk1.6.0_22inkeytool.exe -list -keystore c:usersselvindesktopselvin.kp
second edit
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…