Fix pub/private export bug in Curve25519

pull/16/head
Maxime Vincent 2018-05-09 13:57:17 +02:00 committed by Daniele Lacamera
parent 27c5db90b1
commit 7e3b82b3b4
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ public class Curve25519 extends NativeStruct {
public byte[] exportPublic() { public byte[] exportPublic() {
if (state == WolfCryptState.READY) { if (state == WolfCryptState.READY) {
return wc_curve25519_export_private(); return wc_curve25519_export_public();
} else { } else {
throw new IllegalStateException( throw new IllegalStateException(
"No available key to perform the operation."); "No available key to perform the operation.");