public void encrypt(ByteBuffer output, final byte[] nonce, final byte[] plaintext)
      throws GeneralSecurityException {
    if (output.remaining() < plaintext.length) {
      throw new IllegalArgumentException("Given ByteBuffer output is too small");
    }
    process(nonce, output, ByteBuffer.wrap(plaintext));
  }
Encrypts {@code plaintext} using {@code nonce} and writes result to {@code output}.
java_src/src/main/java/com/google/crypto/tink/aead/internal/InsecureNonceChaCha20Base.java