public static void main(String[] args) throws Exception {
char[] password = "你的密码".toCharArray();
java.io.FileInputStream fis = new java.io.FileInputStream("keystore文件路径");
KeyStore ks = KeyStore.getInstance("jks");
ks.load(fis, password);
KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) ks.getEntry(
"keystore别名",
new KeyStore.PasswordProtection(password));
System.out.println(pkEntry.getPrivateKey().toString());
}
Android 提取keystore私钥
最新推荐文章于 2023-12-07 13:14:25 发布