@Override
  public byte[] encrypt(final byte[] plaintext, final byte[] associatedData)
      throws GeneralSecurityException {
    byte[] ciphertext = rawEncrypt(plaintext, associatedData);
    if (outputPrefix.length == 0) {
      return ciphertext;
    }
    return Bytes.concat(outputPrefix, ciphertext);
  }
XChaCha20Poly1305 AEAD construction, as described in
https://tools.ietf.org/html/draft-arciszewski-xchacha-01.
java_src/src/main/java/com/google/crypto/tink/subtle/XChaCha20Poly1305.java