diff --git a/core/java/src/net/i2p/data/LeaseSet.java b/core/java/src/net/i2p/data/LeaseSet.java index e481765d02a81162e4f1d2b006905e7e5d5f9b03..8d525979823ef967ea56bfecda92706321ae85c6 100644 --- a/core/java/src/net/i2p/data/LeaseSet.java +++ b/core/java/src/net/i2p/data/LeaseSet.java @@ -266,10 +266,8 @@ public class LeaseSet extends DatabaseEntry { public void readBytes(InputStream in) throws DataFormatException, IOException { _destination = new Destination(); _destination.readBytes(in); - _encryptionKey = new PublicKey(); - _encryptionKey.readBytes(in); - _signingKey = new SigningPublicKey(); - _signingKey.readBytes(in); + _encryptionKey = PublicKey.create(in); + _signingKey = SigningPublicKey.create(in); int numLeases = (int) DataHelper.readLong(in, 1); if (numLeases > MAX_LEASES) throw new DataFormatException("Too many leases - max is " + MAX_LEASES);