gpt4 book ai didi

java - 如何从 byte[] 数组中恢复 RSA 公钥?

转载 作者:IT老高 更新时间:2023-10-28 20:37:03 27 4
gpt4 key购买 nike

我想知道是否可以恢复我之前转换为字节数组的 RSA 公钥。

byte[] keyBytes = publicKey.getEncoded();

感谢您的帮助。

最佳答案

PublicKey publicKey = 
KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(bytes));

更多信息see this tutorial

关于java - 如何从 byte[] 数组中恢复 RSA 公钥?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2411096/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com