Data: Change some internal key methods to package private

This commit is contained in:
zzz
2025-02-07 11:09:35 -05:00
parent e5f82d11f7
commit e3191da2a6
2 changed files with 6 additions and 6 deletions

View File

@@ -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();

View File

@@ -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");