@Deprecated
  public static KeyData getPublicKeyData(String typeUrl, ByteString serializedPrivateKey)
      throws GeneralSecurityException {
    KeyManager<?> manager = getUntypedKeyManager(typeUrl);
    if (!(manager instanceof PrivateKeyManager)) {
      throw new GeneralSecurityException(
          "manager for key type " + typeUrl + " is not a PrivateKeyManager");
    }
    return ((PrivateKeyManager) manager).getPublicKeyData(serializedPrivateKey);
  }
Extracts the public key data from the private key given in {@code serializedPrivateKey}.

<p>It looks up a {@link PrivateKeyManager} identified by {@code typeUrl}, and calls {@link
PrivateKeyManager#getPublicKeyData} with {@code serializedPrivateKey} as the parameter.

@return the public key of the corresponding private key
@deprecated Instead, users should have their keys in a {@link KeysetHandle} and call {@code
    keysetHandle.getPublicKeysetHandle}.
java_src/src/main/java/com/google/crypto/tink/Registry.java