aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java')
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
index 12bc354..4858ccd 100644
--- a/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
+++ b/src/cz/crcs/ectester/standalone/libs/jni/NativeKeyAgreementSpi.java
@@ -76,7 +76,7 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
if (publicKey instanceof NativeECPublicKey) {
return ((NativeECPublicKey) publicKey).getData();
} else {
- return ECUtil.toX962Uncompressed(publicKey.getW(), ((ECParameterSpec) params).getCurve());
+ return ECUtil.toX962Uncompressed(publicKey.getW(), ((ECParameterSpec) params));
}
}
@@ -84,7 +84,7 @@ public abstract class NativeKeyAgreementSpi extends KeyAgreementSpi {
if (privateKey instanceof NativeECPrivateKey) {
return ((NativeECPrivateKey) privateKey).getData();
} else {
- return ECUtil.toByteArray(privateKey.getS(), ((ECParameterSpec) params).getCurve().getField().getFieldSize());
+ return ECUtil.toByteArray(privateKey.getS(), ((ECParameterSpec) params).getOrder().bitLength());
}
}