From e3191da2a63bc23c78c8d4d625339db6765e8b69 Mon Sep 17 00:00:00 2001 From: zzz <zzz@i2pmail.org> Date: Fri, 7 Feb 2025 11:09:35 -0500 Subject: [PATCH] Data: Change some internal key methods to package private --- core/java/src/net/i2p/data/PublicKey.java | 4 ++-- core/java/src/net/i2p/data/SigningPublicKey.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/java/src/net/i2p/data/PublicKey.java b/core/java/src/net/i2p/data/PublicKey.java index 27a72387ab..805ab5999a 100644 --- a/core/java/src/net/i2p/data/PublicKey.java +++ b/core/java/src/net/i2p/data/PublicKey.java @@ -143,9 +143,9 @@ public class PublicKey extends SimpleDataStructure { * The type of the returned key will be null if the kcert sigtype is null. * * @throws IllegalArgumentException if this is already typed to a different type - * @since 0.9.42 + * @since 0.9.42 changed from public to package private in 0.9.66, not for external use */ - public PublicKey toTypedKey(KeyCertificate kcert) { + PublicKey toTypedKey(KeyCertificate kcert) { if (_data == null) throw new IllegalStateException(); EncType newType = kcert.getEncType(); diff --git a/core/java/src/net/i2p/data/SigningPublicKey.java b/core/java/src/net/i2p/data/SigningPublicKey.java index d0dce77391..46b2871528 100644 --- a/core/java/src/net/i2p/data/SigningPublicKey.java +++ b/core/java/src/net/i2p/data/SigningPublicKey.java @@ -119,9 +119,9 @@ public class SigningPublicKey extends SimpleDataStructure { * The type of the returned key will be null if the kcert sigtype is null. * * @throws IllegalArgumentException if this is already typed to a different type - * @since 0.9.12 + * @since 0.9.12 changed from public to package private in 0.9.66, not for external use */ - public SigningPublicKey toTypedKey(KeyCertificate kcert) { + SigningPublicKey toTypedKey(KeyCertificate kcert) { if (_data == null) throw new IllegalStateException(); SigType newType = kcert.getSigType(); @@ -185,9 +185,9 @@ public class SigningPublicKey extends SimpleDataStructure { /** * Write the data up to a max of 128 bytes. * If longer, the rest will be written in the KeyCertificate. - * @since 0.9.12 + * @since 0.9.12 changed from public to package private in 0.9.66, not for external use */ - public void writeTruncatedBytes(OutputStream out) throws DataFormatException, IOException { + void writeTruncatedBytes(OutputStream out) throws DataFormatException, IOException { // we don't use _type here so we can write the data even for unknown type //if (_type.getPubkeyLen() <= KEYSIZE_BYTES) if (_data == null) throw new DataFormatException("No data to write out"); -- GitLab