@Override
  public boolean equalsKey(Key o) {
    if (!(o instanceof LegacyKmsEnvelopeAeadKey)) {
      return false;
    }
    LegacyKmsEnvelopeAeadKey that = (LegacyKmsEnvelopeAeadKey) o;
    return that.parameters.equals(parameters) && Objects.equals(that.idRequirement, idRequirement);
  }
Describes an EnvelopeAead backed by a KMS.

<p>Usage of this key type is not recommended. Instead, we recommend to implement the idea of this
class manually:

<ol>
  <li>Create an remote {@link com.google.crypto.tink.Aead} object for your KMS with an
      appropriate Tink extension (typically using a subclass of {@link
      com.google.crypto.tink.KmsClient}).
  <li>Create an envelope AEAD with {@link com.google.crypto.tink.aead.KmsEnvelopeAead#create}.
</ol>

See {@link LegacyKmsEnvelopeParameters} for known issues.
java_src/src/main/java/com/google/crypto/tink/aead/LegacyKmsEnvelopeAeadKey.java