Fix pub/private export bug in Curve25519
parent
27c5db90b1
commit
7e3b82b3b4
|
@ -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.");
|
||||||
|
|
Loading…
Reference in New Issue