private static void copyBlockSize(byte[] output, byte[] in, int idx) {
    int copyCount = Math.min(MAC_TAG_SIZE_IN_BYTES, in.length - idx);
    System.arraycopy(in, idx, output, 0, copyCount);
    output[copyCount] = 1;
    if (copyCount != MAC_TAG_SIZE_IN_BYTES) {
      Arrays.fill(output, copyCount + 1, output.length, (byte) 0);
    }
  }
Poly1305 one-time MAC based on RFC 7539.

<p>This is not an implementation of the MAC interface on purpose and it is not equivalent to
HMAC.

<p>The implementation is based on poly1305 implementation by Andrew Moon
(https://github.com/floodyberry/poly1305-donna) and released as public domain.
java_src/src/main/java/com/google/crypto/tink/aead/internal/Poly1305.java