Skip to content
Snippets Groups Projects
Commit bf75f382 authored by cyberta's avatar cyberta Committed by cyberta
Browse files

return generic PrivateKey interface instead of EdECPrivateKey from PrivateKeyHelper

parent d5fa1677
No related branches found
No related tags found
1 merge request!324Release 1.5.0RC1
......@@ -72,7 +72,7 @@ public class PrivateKeyHelper {
return key;
}
private EdECPrivateKey parseECPrivateKey(String ecKeyString) {
private PrivateKey parseECPrivateKey(String ecKeyString) {
KeyFactory kf;
try {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
......@@ -82,7 +82,7 @@ public class PrivateKeyHelper {
}
ecKeyString = ecKeyString.replaceFirst(ED_25519_KEY_BEGIN, "").replaceFirst(ED_25519_KEY_END, "");
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(Base64.decode(ecKeyString));
return (EdECPrivateKey) kf.generatePrivate(keySpec);
return kf.generatePrivate(keySpec);
} catch (NoSuchAlgorithmException | NoSuchProviderException | InvalidKeySpecException e) {
e.printStackTrace();
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment