@Override
  public HybridDecrypt getPrimitive(ByteString serializedKey) throws GeneralSecurityException {
    try {
      HpkePrivateKey keyProto =
          HpkePrivateKey.parseFrom(serializedKey, ExtensionRegistryLite.getEmptyRegistry());
      return HpkeDecrypt.create(parsePrivateKey(keyProto));
    } catch (InvalidProtocolBufferException e) {
      throw new GeneralSecurityException("Expected serialized HpkePrivateKey proto", e);
    }
  }
A KeyManager for HybridDecrypt with a custom type URL for testing.
java_src/src/main/java/com/google/crypto/tink/hybrid/internal/testing/LegacyHybridDecryptKeyManager.java