我想从DER编码的八位字符串生成私钥。
0x3A:6B:2E:AA:0D:9F:25:A9:E4:55:98:3F:EB:5B:B9:47:52:81:21:91:1B:F3:B7:6B:E5:66:1C:89:DB:F2:4B:26
我试图转换为字节...
byte[] bytes = DatatypeConverter.parseHexBinary(
"3A6B2EAA0D9F25A9E455983FEB5BB947528121911BF3B76BE5661C89DBF24B26");
PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(bytes);
PrivateKey pkey = fact.generatePrivate(privSpec);
但没有奏效。它抛出异常
"DEF length 107 object truncated by 77"
你能帮忙吗?