如何获得keyhash

时间:2023-03-09 14:23:54
如何获得keyhash

keyhash是由keystore产生的

三个命令解决问题

keytool -exportcert -alias androiddebugkey -keystore debug.keystore > debug.txt

输入密码:
openssl sha1 -binary debug.txt > debug_sha.txt
openssl base64 -in debug_sha.txt > debug_base64.txt

debug_base64.txt内就是keystore对应的keyhash

在mac下可以自己生成,win下可能需要keytool工具和openssl工具