public byte[] encrypt(final byte[] plaintext, final byte[] associatedData)
      throws GeneralSecurityException {
    if (aead != null) {
      return this.aead.encrypt(plaintext, associatedData);
    } else {
      return this.deterministicAead.encryptDeterministically(plaintext, associatedData);
    }
  }
Encrypts {@code plaintext} with {@code associatedData} as associated authenticated data. The
resulting ciphertext allows for checking authenticity and integrity of associated data ({@code
associatedData}), but does not guarantee its secrecy.

@param plaintext the plaintext to be encrypted. It must be non-null, but can also be an empty
    (zero-length) byte array
@param associatedData associated data to be authenticated, but not encrypted. Associated data
    is optional, so this parameter can be null. In this case the null value is equivalent to an
    empty (zero-length) byte array. For successful decryption the same associatedData must be
    provided along with the ciphertext.
@return resulting ciphertext
java_src/src/main/java/com/google/crypto/tink/hybrid/subtle/AeadOrDaead.java