summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-12-03 14:53:23 +0100
committercyberta <cyberta@riseup.net>2024-12-11 00:09:34 +0000
commitbf75f3824596f53f0c6e9a2cfb3629da905b59d1 (patch)
tree90ba61a79ff2a2ad8a17bcdb90603a9f5daa37c9 /app/src/main/java
parentd5fa16775ff3156bbbbd1583b1171e273614b6ca (diff)
return generic PrivateKey interface instead of EdECPrivateKey from PrivateKeyHelper
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/utils/PrivateKeyHelper.java4
1 files changed, 2 insertions, 2 deletions
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;