@SuppressWarnings("UnusedException")
  @Deprecated
  public static final KeysetHandle readNoSecret(final byte[] serialized)
      throws GeneralSecurityException {
    try {
      Keyset keyset = Keyset.parseFrom(serialized, ExtensionRegistryLite.getEmptyRegistry());
      assertNoSecretKeyMaterial(keyset);
      return KeysetHandle.fromKeyset(keyset);
    } catch (InvalidProtocolBufferException e) {
      // Do not propagate InvalidProtocolBufferException to guarantee no key material is leaked
      throw new GeneralSecurityException("invalid keyset");
    }
  }
Tries to create a {@link KeysetHandle} from a serialized keyset which contains no secret key
material.

<p>This can be used to load public keysets or envelope encryption keysets. Users that need to
load cleartext keysets can use {@link CleartextKeysetHandle}.

<p>Note: new code should call {@code TinkProtoKeysetFormat(serialized)} instead.

@return a new {@link KeysetHandle} from {@code serialized} that is a serialized {@link Keyset}
@throws GeneralSecurityException if the keyset is invalid
@deprecated Call {TinkProtoKeysetFormat.parseKeysetWithoutSecret} instead.
java_src/src/main/java/com/google/crypto/tink/KeysetHandle.java