From bf75f3824596f53f0c6e9a2cfb3629da905b59d1 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 3 Dec 2024 14:53:23 +0100 Subject: return generic PrivateKey interface instead of EdECPrivateKey from PrivateKeyHelper --- .../main/java/se/leap/bitmaskclient/base/utils/PrivateKeyHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/base/utils/PrivateKeyHelper.java b/app/src/main/java/se/leap/bitmaskclient/base/utils/PrivateKeyHelper.java index 7abe9416..eb4d6956 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/utils/PrivateKeyHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/utils/PrivateKeyHelper.java @@ -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; -- cgit v1.2.3