假如签名文件为debug.keystore
那么我们可以把debug.keystore文件拷贝到keytool所在目录下
首先运行如下
keytool -exportcert -alias thisisaliasname -keystore debug.keystore > d:\openssl\bin\debug.keystore.txt
要求输入密钥,比如123456
在d:\openssl\bin目录下得到了debug.keystore.txt
于是进入到d:\openssl\bin目录后运行如下
openssl sha1 -binary debug.keystore.txt > debug.keystore.sha.txt
于是再次得到由sha1算法计算得到的二进制结构的debug.keystore.sha.txt
最后再次运行如下
openssl base64 -in debug.keystore.sha.txt > debug.keystore.base64.txt
那么打开文件debug.keystore.base64.txt即可得到你想要的Key Hashes值了
示例结果: