【发布时间】:2018-06-04 02:39:20
【问题描述】:
如何使用 JAVA 读取 .pem 文件中的 EC 私钥。在阅读时,我收到以下异常。
原因:java.security.InvalidKeyException: IOException : version mismatch: (supported: 00, parsed: 01
其实我的。 Pem 文件包含以下结构的私钥。
----开始EC私钥------ ====+====+=== ====+====+=== -----结束EC私钥-----
【问题讨论】:
-
你能详细说明你的问题吗?
-
Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. 见:How to create a Minimal, Complete, and Verifiable example。
-
当我尝试使用 java 读取 .pem 格式的 EC 私钥时,出现以下异常。原因是:“ java.security.InvalidKeyException: IOException : version mismatch: (supported : 00, 解析: 01)"