@Override
  public byte[] encrypt(final byte[] plaintext, final byte[] associatedData)
      throws GeneralSecurityException {
    // Check that ciphertext is not longer than the max. size of a Java array.
    byte[] ciphertext = rawEncrypt(plaintext, associatedData);
    if (outputPrefix.length == 0) {
      return ciphertext;
    }
    return Bytes.concat(outputPrefix, ciphertext);
  }
On Android KitKat (API level 19) this method does not support non null or non empty {@code
associatedData}. It might not work at all in older versions.
java_src/src/main/java/com/google/crypto/tink/aead/subtle/AesGcmSiv.java