2929 * implementation by Jack O'Connor.
3030 * </p>
3131 *
32- * @since 1.16
3332 * @see <a href="https://github.com/BLAKE3-team/BLAKE3">BLAKE3 hash function</a>
33+ * @since 1.16
3434 */
3535public final class Blake3 {
3636 // TODO: migrate to Integer.BYTES after upgrading to Java 8
@@ -208,7 +208,8 @@ private static int[] unpackInts(final byte[] buf, final int nrInts) {
208208 }
209209
210210 // The mixing function, G, which mixes either a column or a diagonal.
211- private static void g (final int [] state , final int a , final int b , final int c , final int d , final int mx , final int my ) {
211+ private static void g (
212+ final int [] state , final int a , final int b , final int c , final int d , final int mx , final int my ) {
212213 state [a ] += state [b ] + mx ;
213214 state [d ] = Integer .rotateRight (state [d ] ^ state [a ], 16 );
214215 state [c ] += state [d ];
@@ -245,7 +246,8 @@ private static void round(final int[] state, final int[] msg, final byte[] sched
245246 };
246247
247248 private static int [] compress (
248- final int [] chainingValue , final int [] blockWords , final int blockLength , final long counter , final int flags ) {
249+ final int [] chainingValue , final int [] blockWords , final int blockLength , final long counter ,
250+ final int flags ) {
249251 final int [] state = Arrays .copyOf (chainingValue , 16 );
250252 System .arraycopy (IV , 0 , state , 8 , 4 );
251253 state [12 ] = (int ) counter ;
@@ -263,7 +265,8 @@ private static int[] compress(
263265 return state ;
264266 }
265267
266- private static Output parentOutput (final int [] leftChildCV , final int [] rightChildCV , final int [] key , final int flags ) {
268+ private static Output parentOutput (
269+ final int [] leftChildCV , final int [] rightChildCV , final int [] key , final int flags ) {
267270 final int [] blockWords = Arrays .copyOf (leftChildCV , 16 );
268271 System .arraycopy (rightChildCV , 0 , blockWords , 8 , 8 );
269272 return new Output (key .clone (), blockWords , 0 , BLOCK_LEN , flags | PARENT );
@@ -304,7 +307,8 @@ void rootOutputBytes(final byte[] out, int offset, int length) {
304307 while (length > 0 ) {
305308 int chunkLength = Math .min (OUT_LEN * 2 , length );
306309 length -= chunkLength ;
307- final int [] words = compress (inputChainingValue , blockWords , blockLength , outputBlockCounter ++, flags | ROOT );
310+ final int [] words =
311+ compress (inputChainingValue , blockWords , blockLength , outputBlockCounter ++, flags | ROOT );
308312 int wordCounter = 0 ;
309313 while (chunkLength > 0 ) {
310314 final int wordLength = Math .min (INT_BYTES , chunkLength );
0 commit comments