private byte[] rawDecrypt(final byte[] ciphertext, final byte[] associatedData)
      throws GeneralSecurityException {
    if (ciphertext.length < ChaCha20.NONCE_LENGTH_IN_BYTES + Poly1305.MAC_TAG_SIZE_IN_BYTES) {
      throw new GeneralSecurityException("ciphertext too short");
    }
    byte[] nonce = Arrays.copyOf(ciphertext, ChaCha20.NONCE_LENGTH_IN_BYTES);
    ByteBuffer rawCiphertext =
        ByteBuffer.wrap(
            ciphertext,
            ChaCha20.NONCE_LENGTH_IN_BYTES,
            ciphertext.length - ChaCha20.NONCE_LENGTH_IN_BYTES);
    return cipher.decrypt(rawCiphertext, nonce, associatedData);
  }
ChaCha20Poly1305 AEAD construction, as described in <a
href="https://tools.ietf.org/html/rfc8439#section-2.8">RFC 8439, section 2.8</a>.

@since 1.1.0
java_src/src/main/java/com/google/crypto/tink/subtle/ChaCha20Poly1305.java